From 8171fac4d00c3dcbb33d82043ef4a5923694aec4 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 24 十一月 2026 14:43:47 +0800
Subject: [PATCH] yxh
---
src/views/project/donationdetails/index.vue | 14 +++
src/views/project/fund/performancedetails/index.vue | 57 +++++--------
src/views/project/fund/applyDetail/index.vue | 102 ++++++++++++++++++++-----
src/views/project/travelexpenseapply/travelexpensedetail/index.vue | 24 +++++-
src/views/project/tallage/computingBill/index.vue | 17 +++
src/views/project/unitCost/particulars/index.vue | 17 +++
6 files changed, 165 insertions(+), 66 deletions(-)
diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue
index 50b2afe..f51a3fc 100644
--- a/src/views/project/donationdetails/index.vue
+++ b/src/views/project/donationdetails/index.vue
@@ -4322,9 +4322,19 @@
},
//鏂囦欢涓婁紶
handleUploadError() {},
+ /** 2026-11-23锛氭寜鏂囦欢鍚嶄粠鍒楄〃涓簿纭垹闄や竴椤癸紝閬垮厤鐢ㄩ瑙堝垪琛�(blob)鏁磋〃瑕嗙洊闄勪欢瀛楁 */
+ spliceByName(list, name) {
+ if (!list || !name) {
+ return;
+ }
+ const idx = list.findIndex(item => item && item.name === name);
+ if (idx > -1) {
+ list.splice(idx, 1);
+ }
+ },
remove(file, fileList) {
- this.fileListto.splice(this.fileListto.indexOf(file), 1);
- this.annexfilesList = this.fileListto;
+ this.spliceByName(this.fileListto, file && file.name);
+ this.spliceByName(this.annexfilesList, file && file.name);
},
// 涓婁紶鎴愬姛
uploadSccess(response, file, fileList) {
diff --git a/src/views/project/fund/applyDetail/index.vue b/src/views/project/fund/applyDetail/index.vue
index f3fa626..381772a 100644
--- a/src/views/project/fund/applyDetail/index.vue
+++ b/src/views/project/fund/applyDetail/index.vue
@@ -2521,6 +2521,10 @@
addorupdateFund(this.form).then(response => {
if (response.code === 200) {
+ // 2026-11-23锛氬悗绔墧闄や簡鏃犳晥锛坆lob:/data:锛夐檮浠跺湴鍧�鏃剁粰鍑烘彁绀�
+ if (response.attachWarn) {
+ this.$modal.msgWarning(response.attachWarn);
+ }
this.$modal.msgSuccess("鐢宠鍗曚繚瀛樻垚鍔燂紒");
// 闈炴彁閱掔姸鎬佷笅鎵ц瀹℃壒瑙e喅寮傛璋冪敤寤惰繜闂
if (!this.Savereminder) {
@@ -3072,13 +3076,33 @@
},
remove(file, fileList) {
- const rbDetails = [...this.rbDetails];
+ // 2026-11-23锛氫笉鍐嶇敤"棰勮鐢ㄤ复鏃跺垪琛�"(blob: URL) 鏁磋〃瑕嗙洊闄勪欢瀛楁锛�
+ // 鏀逛负鎸夋枃浠跺悕绮剧‘鍒犻櫎锛岄伩鍏� blob: 鍦板潃琚繚瀛樿繘 annexfiles / invoicefiles銆�
+ const name =
+ (file && (file.name || (file.raw && file.raw.name))) || "";
+ if (!this.rbDetails[this.atpresent]) {
+ return;
+ }
if (this.activeName == "common") {
- this.fileListto.splice(this.fileListto.indexOf(file), 1);
- rbDetails[this.atpresent].annexfilesList = this.fileListto;
+ this.spliceByName(this.fileListto, name);
+ this.spliceByName(this.rbDetails[this.atpresent].annexfilesList, name);
} else {
- this.invoicefileListto.splice(this.invoicefileListto.indexOf(file), 1);
- rbDetails[this.atpresent].invoicefilesList = this.invoicefileListto;
+ this.spliceByName(this.invoicefileListto, name);
+ this.spliceByName(
+ this.rbDetails[this.atpresent].invoicefilesList,
+ name
+ );
+ }
+ },
+
+ /** 鎸夋枃浠跺悕浠庡垪琛ㄤ腑鍒犻櫎涓�椤癸紙鎵句笉鍒板垯涓嶅仛浠讳綍浜嬶級 */
+ spliceByName(list, name) {
+ if (!list || !name) {
+ return;
+ }
+ const idx = list.findIndex(item => item && item.name === name);
+ if (idx > -1) {
+ list.splice(idx, 1);
}
},
@@ -3150,9 +3174,11 @@
type: /\.pdf$/i.test(file.name) ? "pdf" : "image"
};
this.pdfimgsrcList.push(localUrl);
+ // 2026-11-23锛歶rl 瀛樻湇鍔$璺緞锛堟潈濞佸�硷級锛宲reviewUrl 鍙敤浜庢湰鍦伴瑙�
this.fileListto.push({
name: file.name,
- url: localUrl
+ url: response.fileName,
+ previewUrl: localUrl
});
this.$modal.msgSuccess(response.msg);
@@ -3185,9 +3211,11 @@
type: /\.pdf$/i.test(file.name) ? "pdf" : "image"
};
this.invoicepdfimgsrcList.push(localUrl);
+ // 2026-11-23锛歶rl 瀛樻湇鍔$璺緞锛堟潈濞佸�硷級锛宲reviewUrl 鍙敤浜庢湰鍦伴瑙�
this.invoicefileListto.push({
name: file.name,
- url: localUrl
+ url: response.fileName,
+ previewUrl: localUrl
});
this.$modal.msgSuccess(response.msg);
@@ -3257,7 +3285,9 @@
.then(blob => {
return {
name: value.name,
- url: URL.createObjectURL(blob)
+ // 2026-11-23锛氭潈濞佸湴鍧�浠嶆槸鏈嶅姟绔矾寰勶紝blob 鍙斁 previewUrl
+ url: value.url,
+ previewUrl: URL.createObjectURL(blob)
};
})
.catch(error => {
@@ -3269,9 +3299,10 @@
Promise.all(fetchPromises).then(fileListto => {
this.fileListto = fileListto.filter(item => item !== null);
- this.pdfimg = this.fileListto[0].url;
+ this.pdfimg =
+ this.fileListto.length > 0 ? this.fileListto[0].previewUrl : "";
console.log(this.pdfimg, "pdfimg");
- this.pdfimgsrcList = this.fileListto.map(item => item.url);
+ this.pdfimgsrcList = this.fileListto.map(item => item.previewUrl);
});
this.previewpdf = true;
@@ -3290,7 +3321,9 @@
.then(blob => {
return {
name: value.name,
- url: URL.createObjectURL(blob)
+ // 2026-11-23锛氭潈濞佸湴鍧�浠嶆槸鏈嶅姟绔矾寰勶紝blob 鍙斁 previewUrl
+ url: value.url,
+ previewUrl: URL.createObjectURL(blob)
};
})
.catch(error => {
@@ -3304,10 +3337,13 @@
this.invoicefileListto = invoicefileListto.filter(
item => item !== null
);
- this.invoicepdfimg = this.invoicefileListto[0].url;
+ this.invoicepdfimg =
+ this.invoicefileListto.length > 0
+ ? this.invoicefileListto[0].previewUrl
+ : "";
console.log(this.invoicepdfimg, "invoicepdfimg");
this.invoicepdfimgsrcList = this.invoicefileListto.map(
- item => item.url
+ item => item.previewUrl
);
});
@@ -3331,10 +3367,15 @@
downFile(item) {
const source =
this.activeName == "common" ? this.fileListto : this.invoicefileListto;
- let list = (source || []).map(f => ({ name: f.name, url: f.url }));
- let index = list.findIndex(f => f.url === item.url);
- if (index < 0 && item && item.url) {
- list = [{ name: item.name, url: item.url }];
+ // 2026-11-23锛氶瑙堜紭鍏堢敤鏈湴 blob锛坧reviewUrl锛夛紝娌℃湁鍒欓��鍥炴湇鍔$璺緞
+ let list = (source || []).map(f => ({
+ name: f.name,
+ url: f.previewUrl || f.url
+ }));
+ const target = item && (item.previewUrl || item.url);
+ let index = list.findIndex(f => f.url === target);
+ if (index < 0 && target) {
+ list = [{ name: item.name, url: target }];
index = 0;
}
this.$previewFile(list, index > -1 ? index : 0);
@@ -3355,7 +3396,10 @@
console.log(row);
let indexvalue = "";
if (this.activeName == "common") {
- const indexlist = this.getIndexInArray(this.pdfimgsrcList, row.url);
+ const indexlist = this.getIndexInArray(
+ this.pdfimgsrcList,
+ row.previewUrl || row.url
+ );
this.pdfimgsrcList.splice(indexlist, 1);
const index = this.getIndexInArray(this.fileListto, row);
this.fileListto.splice(index, 1);
@@ -3364,11 +3408,13 @@
item => item.name == row.name
);
console.log(indexvalue, "鍒犻櫎绱㈠紩");
- this.rbDetails[this.atpresent].annexfilesList.splice(indexvalue, 1);
+ if (indexvalue > -1) {
+ this.rbDetails[this.atpresent].annexfilesList.splice(indexvalue, 1);
+ }
} else {
const indexlist = this.getIndexInArray(
this.invoicepdfimgsrcList,
- row.url
+ row.previewUrl || row.url
);
this.invoicepdfimgsrcList.splice(indexlist, 1);
const index = this.getIndexInArray(this.invoicefileListto, row);
@@ -3378,7 +3424,9 @@
item => item.name == row.name
);
console.log(indexvalue, "鍒犻櫎绱㈠紩");
- this.rbDetails[this.atpresent].invoicefilesList.splice(indexvalue, 1);
+ if (indexvalue > -1) {
+ this.rbDetails[this.atpresent].invoicefilesList.splice(indexvalue, 1);
+ }
}
},
// 鐐瑰嚮涓婄Щ
@@ -3431,7 +3479,17 @@
// console.log(this.rbDetails[this.atpresent].invoicefilesList,'invoicefilesList');
},
Downloadfile(row) {
- window.location.href = row.url;
+ // 2026-11-23锛氫紭鍏堢敤鏈湴 blob 涓嬭浇锛涙病鏈夊垯鎷兼湇鍔$鍦板潃
+ const target = (row && (row.previewUrl || row.url)) || "";
+ if (!target) {
+ return;
+ }
+ if (/^(blob:|data:|https?:)/i.test(target)) {
+ window.location.href = target;
+ } else {
+ window.location.href =
+ this.Networkheader + process.env.VUE_APP_BASE_API + target;
+ }
},
//涓撳/鍖荤枟鏈烘瀯/璐圭敤鎶ラ攢鏈烘瀯閫夋嫨
diff --git a/src/views/project/fund/performancedetails/index.vue b/src/views/project/fund/performancedetails/index.vue
index d7fe7fe..597d9b8 100644
--- a/src/views/project/fund/performancedetails/index.vue
+++ b/src/views/project/fund/performancedetails/index.vue
@@ -251,33 +251,6 @@
</template>
</el-table-column>
<el-table-column
- prop="vatAmount"
- align="right"
- header-align="right"
- class-name="money-column"
- label="澧炲�肩◣"
- width="110"
- :formatter="formatMoney"
- />
- <el-table-column
- prop="cityTaxAmount"
- align="right"
- header-align="right"
- class-name="money-column"
- label="鍩庡缓绋�"
- width="110"
- :formatter="formatMoney"
- />
- <el-table-column
- prop="laborPretaxAmount"
- align="right"
- header-align="right"
- class-name="money-column"
- label="鍔冲姟绋庡墠"
- width="120"
- :formatter="formatMoney"
- />
- <el-table-column
prop="taxamount"
align="right"
header-align="right"
@@ -290,7 +263,7 @@
@blur="normalizeMoney(scope.row, 'taxamount'); chargeSum()"
v-model="scope.row.taxamount"
class="money-input"
- placeholder="鍔冲姟涓◣"
+ placeholder="涓◣"
/>
</template>
</el-table-column>
@@ -299,14 +272,14 @@
align="right"
header-align="right"
class-name="money-column"
- label="鍔冲姟绋庡悗"
+ label="绋庡悗閲戦"
width="120"
:formatter="formatMoney">
<template slot-scope="scope">
<el-input
v-model="scope.row.taxedamount"
class="money-input"
- placeholder="鍔冲姟绋庡悗"
+ placeholder="绋庡悗閲戦"
@blur="normalizeMoney(scope.row, 'taxedamount'); queenchargeSum()"
/>
</template>
@@ -2837,14 +2810,30 @@
this.showSelectionDialog = false;
},
handleUploadError() {},
+ /** 2026-11-23锛氭寜鏂囦欢鍚嶄粠鍒楄〃涓簿纭垹闄や竴椤癸紝閬垮厤鐢ㄩ瑙堝垪琛�(blob)鏁磋〃瑕嗙洊闄勪欢瀛楁 */
+ spliceByName(list, name) {
+ if (!list || !name) {
+ return;
+ }
+ const idx = list.findIndex(item => item && item.name === name);
+ if (idx > -1) {
+ list.splice(idx, 1);
+ }
+ },
remove(file, fileList) {
const rbDetails = [...this.rbDetails];
if (this.activeName == 1) {
- this.fileListto.splice(this.fileListto.indexOf(file), 1);
- rbDetails[this.atpresent].annexfilesList = this.fileListto;
+ this.spliceByName(this.fileListto, file && file.name);
+ this.spliceByName(
+ rbDetails[this.atpresent].annexfilesList,
+ file && file.name
+ );
} else {
- this.invoicefileListto.splice(this.invoicefileListto.indexOf(file), 1);
- rbDetails[this.atpresent].invoicefilesList = this.invoicefileListto;
+ this.spliceByName(this.invoicefileListto, file && file.name);
+ this.spliceByName(
+ rbDetails[this.atpresent].invoicefilesList,
+ file && file.name
+ );
}
},
// 鑾峰彇璇锋眰澶�
diff --git a/src/views/project/tallage/computingBill/index.vue b/src/views/project/tallage/computingBill/index.vue
index 0f03443..6e2fd6a 100644
--- a/src/views/project/tallage/computingBill/index.vue
+++ b/src/views/project/tallage/computingBill/index.vue
@@ -1268,11 +1268,24 @@
return sums;
},
// 鏂囦欢------------------------
+ /** 2026-11-23锛氭寜鏂囦欢鍚嶄粠鍒楄〃涓簿纭垹闄や竴椤癸紝閬垮厤鐢ㄩ瑙堝垪琛�(blob)鏁磋〃瑕嗙洊闄勪欢瀛楁 */
+ spliceByName(list, name) {
+ if (!list || !name) {
+ return;
+ }
+ const idx = list.findIndex(item => item && item.name === name);
+ if (idx > -1) {
+ list.splice(idx, 1);
+ }
+ },
remove(file, fileList) {
const donorchargeorgans = [...this.donorchargeorgans];
- this.fileListto.splice(this.fileListto.indexOf(file), 1);
- donorchargeorgans[this.atpresent].annexFilesList = this.fileListto;
+ this.spliceByName(this.fileListto, file && file.name);
+ this.spliceByName(
+ donorchargeorgans[this.atpresent].annexFilesList,
+ file && file.name
+ );
},
uploadSccess(response, file, fileList) {
diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index e8c6d3e..cc5e04d 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -1338,14 +1338,30 @@
this.pdftitle = "鍏�" + this.invoicepdfimgsrcList.length + "椤�";
}
},
+ /** 2026-11-23锛氭寜鏂囦欢鍚嶄粠鍒楄〃涓簿纭垹闄や竴椤癸紝閬垮厤鐢ㄩ瑙堝垪琛�(blob)鏁磋〃瑕嗙洊闄勪欢瀛楁 */
+ spliceByName(list, name) {
+ if (!list || !name) {
+ return;
+ }
+ const idx = list.findIndex(item => item && item.name === name);
+ if (idx > -1) {
+ list.splice(idx, 1);
+ }
+ },
remove(file, fileList) {
const rbDetails = [...this.rbDetails];
if (this.activeName == 1) {
- this.fileListto.splice(this.fileListto.indexOf(file), 1);
- rbDetails[this.atpresent].annexfilesList = this.fileListto;
+ this.spliceByName(this.fileListto, file && file.name);
+ this.spliceByName(
+ rbDetails[this.atpresent].annexfilesList,
+ file && file.name
+ );
} else {
- this.invoicefileListto.splice(this.invoicefileListto.indexOf(file), 1);
- rbDetails[this.atpresent].invoicefilesList = this.invoicefileListto;
+ this.spliceByName(this.invoicefileListto, file && file.name);
+ this.spliceByName(
+ rbDetails[this.atpresent].invoicefilesList,
+ file && file.name
+ );
}
},
diff --git a/src/views/project/unitCost/particulars/index.vue b/src/views/project/unitCost/particulars/index.vue
index 4cbc82a..4fc814a 100644
--- a/src/views/project/unitCost/particulars/index.vue
+++ b/src/views/project/unitCost/particulars/index.vue
@@ -1238,11 +1238,24 @@
return sums;
},
// 鏂囦欢------------------------
+ /** 2026-11-23锛氭寜鏂囦欢鍚嶄粠鍒楄〃涓簿纭垹闄や竴椤癸紝閬垮厤鐢ㄩ瑙堝垪琛�(blob)鏁磋〃瑕嗙洊闄勪欢瀛楁 */
+ spliceByName(list, name) {
+ if (!list || !name) {
+ return;
+ }
+ const idx = list.findIndex(item => item && item.name === name);
+ if (idx > -1) {
+ list.splice(idx, 1);
+ }
+ },
remove(file, fileList) {
const donorchargeorgans = [...this.donorchargeorgans];
- this.fileListto.splice(this.fileListto.indexOf(file), 1);
- donorchargeorgans[this.atpresent].annexFilesList = this.fileListto;
+ this.spliceByName(this.fileListto, file && file.name);
+ this.spliceByName(
+ donorchargeorgans[this.atpresent].annexFilesList,
+ file && file.name
+ );
},
uploadSccess(response, file, fileList) {
--
Gitblit v1.9.3