From d3f66f66a0fa684bdc80bca582adb726b102966f Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期三, 04 十一月 2026 09:55:41 +0800
Subject: [PATCH] 器管回款列表增加无回款医院的过滤,修改增加应收款、实收款修改
---
src/views/project/fund/applyDetail/index.vue | 224 +++++++++++++++++++++++++------------------------------
1 files changed, 102 insertions(+), 122 deletions(-)
diff --git a/src/views/project/fund/applyDetail/index.vue b/src/views/project/fund/applyDetail/index.vue
index e12ef3a..715f80a 100644
--- a/src/views/project/fund/applyDetail/index.vue
+++ b/src/views/project/fund/applyDetail/index.vue
@@ -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="鐢宠璇存槑" />
@@ -524,7 +516,24 @@
</span>
</el-dialog>
<el-dialog v-dialogDrags :modal="false" :close-on-click-modal="false" :title="pdftitle" :visible.sync="pdfVisible"
- width="60%">
+ :fullscreen="pdfFullscreen" width="60%" custom-class="pdf-resize-dialog" @closed="pdfFullscreen = false">
+ <template slot="title">
+ <span>{{ pdftitle }}</span>
+ <el-button class="pdf-fullscreen-btn" size="mini"
+ :icon="pdfFullscreen ? 'el-icon-close' : 'el-icon-full-screen'"
+ @click="pdfFullscreen = !pdfFullscreen">{{ pdfFullscreen ? "杩樺師" : "鍏ㄥ睆" }}</el-button>
+ </template>
+ <el-alert
+ :title="
+ activeName == 'invoice'
+ ? '褰撳墠姝e湪鎿嶄綔锛氬彂绁ㄦ枃浠讹紙璇风‘璁ょエ鎹睘浜庡彂绁級'
+ : '褰撳墠姝e湪鎿嶄綔锛氭櫘閫氶檮浠讹紙璇峰嬁鍦ㄦ涓婁紶鍙戠エ锛�'
+ "
+ :type="activeName == 'invoice' ? 'success' : 'warning'"
+ :closable="false"
+ show-icon
+ style="margin-bottom: 10px;"
+ />
<div style="margin-bottom: 10px;">
<el-table :data="tableDatatop" style="width: 100%">
<el-table-column v-if="businessType == 4" prop="price" align="center" label="鍗曚环">
@@ -609,18 +618,7 @@
</div>
</div>
- <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin">
- <!-- <img :src="pdfimg" /> -->
- <el-image ref="imagePreview" style="width: 95%; height: 90%" :src="pdfimg"
- @click="handleImageClick(initialIndex)">
- <!-- <div slot="error" class="image-slot">
- <i class="el-icon-picture-outline"></i>
- </div> -->
- </el-image>
- <custom-image-viewer :url-list="pdfimgsrcList" :initial-index="currentIndex" :visible="viewerVisible"
- @update:visible="viewerVisible = $event" @close="handleViewerClose" />
- </div>
- <div v-else class="pdfimgmins">{{ hintitle }}</div>
+ <attachment-preview-pane :file="embeddedFile" style="flex: 1; min-width: 0;" />
</div>
</el-tab-pane>
<el-tab-pane label="鍙戠エ鏂囦欢" name="invoice">
@@ -661,19 +659,7 @@
</div>
</div>
- <div v-if="this.previewpdf && invoicepdfimgsrcList.length" class="pdfimgmin">
- <!-- <img :src="pdfimg" /> -->
- <el-image style="width: 95%; height: 90%" :src="invoicepdfimg"
- @click="invoicehandleImageClick(initialIndex)">
- <!-- <div slot="error" class="image-slot">
- <i class="el-icon-picture-outline"></i>
- </div> -->
- </el-image>
- <custom-image-viewer :url-list="invoicepdfimgsrcList" :initial-index="invoicecurrentIndex"
- :visible="invoiceviewerVisible" @update:visible="invoiceviewerVisible = $event"
- @close="invoicehandleViewerClose" />
- </div>
- <div v-else class="pdfimgmins">{{ hintitle }}</div>
+ <attachment-preview-pane :file="invoiceEmbeddedFile" style="flex: 1; min-width: 0;" />
</div>
</el-tab-pane>
</el-tabs>
@@ -1129,7 +1115,7 @@
invoicepdfimg: "",
invoicepdfimgsrcList: [],
invoDatatop: [],
- activeName: "common", //鏂囦欢绫诲瀷
+ activeName: "invoice", //鏂囦欢绫诲瀷锛氶粯璁ゅ彂绁ㄦ枃浠�
//涓婁紶闄勪欢璺緞
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
ICDtoken: getToken(),
@@ -1140,6 +1126,7 @@
//绁ㄦ嵁鏂囦欢
pdftitle: "",
pdfimg: "",
+ invoiceEmbeddedFile: null,
pdfimgsrcList: [],
currentIndex: 0, // 鍒濆绱㈠紩
invoicecurrentIndex: 0, // 鍒濆绱㈠紩
@@ -1242,14 +1229,8 @@
},
// 鑾峰彇璇锋眰澶�
Getnetworkheader() {
- let string = window.location.href;
- if (string.includes("9091")) {
- const index = string.indexOf("9091");
- this.Networkheader = string.slice(0, index + 4); // 鎴彇9091鍙婂叾鍓嶉儴瀛楃
- } else {
- const index = string.indexOf("8032");
- this.Networkheader = string.slice(0, index + 4); // 鎴彇8032鍙婂叾鍓嶉儴瀛楃
- }
+ // 浠ュ綋鍓嶉〉闈� origin 涓哄噯锛屽吋瀹� 80/8032/9091 鍙婂悗缁鍙h皟鏁�
+ this.Networkheader = window.location.origin;
},
/** 閫氳繃鍙傛暟鑾峰彇涓氬姟绫诲瀷 */
getroute() {
@@ -2606,6 +2587,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 || "");
@@ -2631,6 +2629,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 => {
@@ -2690,7 +2699,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;
@@ -2949,7 +2964,7 @@
/**
* 2026-10-15锛氫笂浼犳椂鏍¢獙闄勪欢鏂囦欢鍚嶏紙涓氬姟瑕佹眰锛氫笉鍚堟牸绔嬪嵆鎻愮ず涓斾笉鍔犲叆鍒楄〃锛夈��
- * 瑙勫垯涓庡悗绔� AttachmentNameValidator 鍚屽彛寰勶細蹇呴』鍚腑鏂� / 鍘绘帀鎵╁睍鍚嶅悗涓诲共 鈮�20 瀛� /
+ * 瑙勫垯涓庡悗绔� AttachmentNameValidator 鍚屽彛寰勶細涓嶅己鍒跺惈涓枃 / 鍘绘帀鎵╁睍鍚嶅悗涓诲共 鈮�20 瀛� /
* 涓嶅惈绌烘牸鍙� / \ : * ? " < > | # % 绛夌壒娈婂瓧绗︺��
*/
checkUploadFileName(file) {
@@ -2988,27 +3003,27 @@
const config = {
headers: { Authorization: "Bearer " + this.ICDtoken }
};
- const pdfimg = this.Networkheader + "/prod-api" + response.fileName;
+ const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + response.fileName;
//鑾峰彇绁ㄦ嵁淇℃伅浣嶇疆
if (this.activeName == "common") {
if (response.code == 200) {
this.previewpdf = true;
- fetch(pdfimg, config)
- .then(response => response.blob())
- .then(blob => {
- // 灏嗚幏鍙栫殑鏁版嵁娴佽浆鎹负URL
- this.pdfimg = URL.createObjectURL(blob);
- this.pdfimgsrcList.push(URL.createObjectURL(blob));
- this.fileListto.push({
- name: file.name,
- url: URL.createObjectURL(blob)
- });
- })
- .catch(error => {
- console.error("Error loading image", error);
- return;
- });
+ // 鏂颁笂浼犳枃浠剁洿鎺ヤ娇鐢ㄦ祻瑙堝櫒鏈湴 File锛岄伩鍏嶆湇鍔$鏂囦欢鍦板潃/Token
+ // 寮傚父鏃舵妸 JSON 閿欒鍝嶅簲褰撴垚鍥剧墖鎴� PDF 棰勮銆�
+ const localBlob = file.raw;
+ const localUrl = URL.createObjectURL(localBlob);
+ this.pdfimg = localUrl;
+ this.embeddedFile = {
+ name: file.name,
+ url: localUrl,
+ type: /\.pdf$/i.test(file.name) ? "pdf" : "image"
+ };
+ this.pdfimgsrcList.push(localUrl);
+ this.fileListto.push({
+ name: file.name,
+ url: localUrl
+ });
this.$modal.msgSuccess(response.msg);
@@ -3027,21 +3042,19 @@
} else {
if (response.code == 200) {
this.previewpdf = true;
- fetch(pdfimg, config)
- .then(response => response.blob())
- .then(blob => {
- // 灏嗚幏鍙栫殑鏁版嵁娴佽浆鎹负URL
- this.invoicepdfimg = URL.createObjectURL(blob);
- this.invoicepdfimgsrcList.push(URL.createObjectURL(blob));
- this.invoicefileListto.push({
- name: file.name,
- url: URL.createObjectURL(blob)
- });
- })
- .catch(error => {
- console.error("Error loading image", error);
- return;
- });
+ const localBlob = file.raw;
+ const localUrl = URL.createObjectURL(localBlob);
+ this.invoicepdfimg = localUrl;
+ this.invoiceEmbeddedFile = {
+ name: file.name,
+ url: localUrl,
+ type: /\.pdf$/i.test(file.name) ? "pdf" : "image"
+ };
+ this.invoicepdfimgsrcList.push(localUrl);
+ this.invoicefileListto.push({
+ name: file.name,
+ url: localUrl
+ });
this.$modal.msgSuccess(response.msg);
@@ -3077,7 +3090,7 @@
if (this.rbDetails[index].annexfilesList) {
// this.rbDetails[index].annexfilesList.forEach((value, indexson) => {
- // const pdfimg = this.Networkheader + "/prod-api" + value.url;
+ // const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
// fetch(pdfimg, config)
// .then(response => response.blob())
// .then(blob => {
@@ -3099,7 +3112,7 @@
const fetchPromises = this.rbDetails[index].annexfilesList.map(
(value, indexson) => {
- const pdfimg = this.Networkheader + "/prod-api" + value.url;
+ const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
return fetch(pdfimg, config)
.then(response => response.blob())
.then(blob => {
@@ -3132,7 +3145,7 @@
if (this.rbDetails[index].invoicefilesList) {
const fetchPromises = this.rbDetails[index].invoicefilesList.map(
(value, indexson) => {
- const pdfimg = this.Networkheader + "/prod-api" + value.url;
+ const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
return fetch(pdfimg, config)
.then(response => response.blob())
.then(blob => {
@@ -3175,50 +3188,17 @@
console.log(this.rbDetails[index].annexfilesList, "annexfilesList");
},
- // 鐐瑰嚮宸蹭笂浼犳枃浠�
+ // 璐圭敤鎶ラ攢锛氶檮浠剁粺涓�浣跨敤鐙珛 FilePreview锛堝綍鍏ャ�佸鎵广�佽鎯呬竴鑷达級
downFile(item) {
- if (this.activeName == "common") {
- this.pdftitle =
- "鍏�" + this.pdfimgsrcList.length + "椤癸紝褰撳墠閫変腑" + item.name;
- let name = item.name.split(".");
- if (name[1] == "pdf") {
- this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
- this.previewpdf = false;
- this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
- } else if (name[1] == "jpg" || "png") {
- console.log(item, "灞曠ず");
- this.previewpdf = true;
- if (item.url) {
- this.pdfimg = item.url;
- } else {
- this.pdfimg = "";
- }
- } else {
- this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
- this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
- this.previewpdf = false;
- }
- } else {
- this.pdftitle =
- "鍏�" + this.invoicepdfimgsrcList.length + "椤癸紝褰撳墠閫変腑" + item.name;
- let name = item.name.split(".");
- if (name[1] == "pdf") {
- this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
- this.previewpdf = false;
- this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
- } else if (name[1] == "jpg" || "png") {
- this.previewpdf = true;
- if (item.url) {
- this.invoicepdfimg = item.url;
- } else {
- this.invoicepdfimg = "";
- }
- } else {
- this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
- this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
- this.previewpdf = false;
- }
+ 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 }];
+ index = 0;
}
+ this.$previewFile(list, index > -1 ? index : 0);
},
getIndexInArray(arr, obj) {
return arr.indexOf(obj);
--
Gitblit v1.9.3