From 946e2122ab3756b668f76f93f2181293ed089adf Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 01 三月 2024 18:43:18 +0800
Subject: [PATCH] 11
---
src/views/project/unitCost/particulars.vue | 608 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 570 insertions(+), 38 deletions(-)
diff --git a/src/views/project/unitCost/particulars.vue b/src/views/project/unitCost/particulars.vue
index 6fe7a3c..c2f6fe8 100644
--- a/src/views/project/unitCost/particulars.vue
+++ b/src/views/project/unitCost/particulars.vue
@@ -133,6 +133,7 @@
<el-table-column
prop="organno"
align="center"
+ fixed
label="鍣ㄥ畼缂栧彿"
width="90"
>
@@ -146,6 +147,7 @@
</el-table-column>
<el-table-column
prop="organname"
+ fixed
align="center"
label="鍣ㄥ畼鍚嶇О"
width="120"
@@ -211,8 +213,7 @@
</el-date-picker>
</template>
</el-table-column>
-
-
+
<el-table-column
prop="amount"
align="center"
@@ -233,7 +234,7 @@
<el-input v-model="scope.row.amount" placeholder="瀹炴敹閲戦" />
</template>
</el-table-column>
-
+
<el-table-column
prop="amounttime"
align="center"
@@ -253,27 +254,53 @@
</el-date-picker>
</template>
</el-table-column>
- <el-table-column prop="organchargedesc" align="center" label="澶囨敞">
+ <el-table-column
+ prop="organchargedesc"
+ width="280"
+ align="center"
+ label="澶囨敞"
+ >
<template slot-scope="scope">
<el-input
+ type="textarea"
+ :rows="1"
v-model="scope.row.organchargedesc"
placeholder="澶囨敞"
/>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center">
- <template slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-circle-plus-outline" @click="handleUpdate(scope.row)"
- v-hasPermi="['system:donorcharge:edit']">鏂板</el-button>
-
- <el-button size="mini" type="text" @click="handleDelete(scope.row)"
- v-hasPermi="['system:donorcharge:remove']"><span class="button-delete"
- ><i class="el-icon-delete"></i>鍒犻櫎</span
- ></el-button>
- <el-button size="mini" type="text" icon="el-icon-folder-opened" @click="handleUpdate(scope.row)"
- v-hasPermi="['system:donorcharge:edit']">闄勪欢</el-button>
- </template>
- </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ width="260"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <el-button
+ type="text"
+ icon="el-icon-circle-plus-outline"
+ @click="handleAddpatient(scope.row)"
+ v-hasPermi="['system:donorcharge:edit']"
+ >鏂板</el-button
+ >
+
+ <el-button
+ type="text"
+ @click="handleDelete(scope.row)"
+ v-hasPermi="['system:donorcharge:remove']"
+ ><span class="button-delete"
+ ><i class="el-icon-delete"></i>鍒犻櫎</span
+ ></el-button
+ >
+ <el-button
+ type="text"
+ icon="el-icon-folder-opened"
+ @click="Filepopup(scope.$index, scope.row)"
+ v-hasPermi="['system:donorcharge:edit']"
+ >闄勪欢</el-button
+ >
+ </template>
+ </el-table-column>
</el-table>
</el-row>
</el-form>
@@ -286,6 +313,251 @@
>
<el-button type="primary" @click="cancel">鍏抽棴</el-button>
</div>
+ <!-- 娣诲姞鎮h�� -->
+ <el-dialog
+ title="鏀惰垂鍣ㄥ畼/缁勭粐閫夋嫨"
+ :visible.sync="dialogVisiblepatient"
+ width="70%"
+ :before-close="handleClosehz"
+ >
+ <div class="examine-jic">
+ <div class="jic-value">
+ <el-row :gutter="20">
+ <!--鐢ㄦ埛鏁版嵁-->
+ <el-form
+ :model="patientqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ label-width="98px"
+ >
+ <el-form-item label="鎮h�呭悕绉帮細">
+ <el-input v-model="patientqueryParams.name"></el-input>
+ </el-form-item>
+ <el-form-item label="鎺ユ敹鍖婚櫌" prop="status">
+ <el-select
+ disabled
+ v-model="patientqueryParams.topic"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in topicoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎹愮尞妗堜緥" prop="status">
+ <el-select
+ v-model="patientqueryParams.topic"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in topicoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery"
+ >鎼滅储</el-button
+ >
+ <el-button
+ icon="el-icon-refresh"
+ size="medium"
+ @click="resetQuery"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+ </el-form>
+ <!-- 閫夋嫨鍣ㄥ畼鍒楄〃 -->
+ <el-table
+ ref="multipleTable"
+ :data="tableData"
+ tooltip-effect="dark"
+ style="width: 100%"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="55"> </el-table-column>
+ <el-table-column label="鎹愮尞鑰�" width="120">
+ <template slot-scope="scope">{{ scope.row.date }}</template>
+ </el-table-column>
+ <el-table-column prop="鍣ㄥ畼缂栧彿" label="濮撳悕" width="120">
+ </el-table-column>
+ <el-table-column
+ prop="address"
+ label="鍣ㄥ畼鍚嶇О"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="address"
+ label="鍥藉鍒嗛厤缂栧彿"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="address"
+ label="鍣ㄥ畼鎺ユ敹鍖婚櫌"
+ show-overflow-tooltip
+ >
+ </el-table-column
+ ><el-table-column
+ prop="address"
+ label="鍙椾綋濮撴皬"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="address"
+ label="鎺ユ敹鏃ユ湡"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="address"
+ label="澶囨敞"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ </el-table>
+ </el-row>
+ <pagination
+ v-show="patienttotal > 0"
+ :total="patienttotal"
+ :page.sync="patientqueryParams.pageNum"
+ :limit.sync="patientqueryParams.pageSize"
+ @pagination="handleAddpatient"
+ />
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogVisiblepatient = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="AddDispatchpatients"
+ >纭畾娣诲姞</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 闄勪欢寮圭獥 -->
+ <el-dialog
+ v-dialogDrags
+ :modal="false"
+ :close-on-click-modal="false"
+ :title="pdftitle"
+ :visible.sync="pdfVisible"
+ width="60%"
+ >
+ <div class="pdfimg">
+ <div class="box-pdf">
+ <div>
+ <el-upload
+ size="mini"
+ class="upload-demo"
+ :action="uploadFileUrl"
+ :file-list="fileListto"
+ :show-file-list="false"
+ multiple
+ drag
+ :headers="headers"
+ :on-success="
+ (response, file, fileList) =>
+ uploadSccess(response, file, fileList)
+ "
+ :on-preview="downFile"
+ :disabled="operationType == 'detail'"
+ :on-error="handleUploadError"
+ :on-remove="remove"
+ accept="image/*,.pdf"
+ >
+ <i class="el-icon-upload"></i>
+ <div class="el-upload__text">
+ 灏嗙エ鎹嫋鍒版澶勶紝鎴�
+ <em
+ ><el-button
+ :disabled="operationType == 'detail'"
+ size="small"
+ type="primary"
+ >鐐瑰嚮涓婁紶</el-button
+ ></em
+ >
+ </div>
+ </el-upload>
+ <el-table
+ :data="fileListto"
+ @row-click="downFile"
+ style="width: 100%"
+ height="400"
+ >
+ <el-table-column
+ prop="name"
+ :show-overflow-tooltip="true"
+ label="鍚嶇О"
+ >
+ <template slot-scope="scope">
+ <i style="color:#409EFF" class=" el-icon-s-order" />
+ <span>{{ scope.row.name }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="name"
+ width="190"
+ :show-overflow-tooltip="true"
+ label="鍔熻兘"
+ >
+ <template slot-scope="scope">
+ <el-button
+ type="danger"
+ size="mini"
+ @click.native.prevent.stop="deletedowfile(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ <el-button
+ type="primary"
+ size="mini"
+ @click.native.prevent.stop="moveupdowfile(scope.row)"
+ >涓婄Щ</el-button
+ >
+ <el-button
+ type="success"
+ size="mini"
+ icon="el-icon-search"
+ circle
+ @click.native.prevent.stop="Downloadfile(scope.row)"
+ ></el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+
+ <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin">
+ <!-- <img :src="pdfimg" /> -->
+ <el-image
+ style="width: 95%; height: 90%"
+ @error="handleImageError"
+ @load="handleImageLoad"
+ :src="pdfimg"
+ :preview-src-list="pdfimgsrcList"
+ >
+ <!-- <div slot="error" class="image-slot">
+ <i class="el-icon-picture-outline"></i>
+ </div> -->
+ </el-image>
+ </div>
+ <div v-else class="pdfimgmins">{{ hintitle }}</div>
+ </div>
+ </el-dialog>
</div>
</div>
</template>
@@ -324,8 +596,32 @@
data() {
return {
activeName: 1, //鏂囦欢绫诲瀷
- // 閮ㄩ棬鏍戦�夐」
-
+ tableData: [
+ {
+ date: "2016-05-03",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�"
+ },
+ {
+ date: "2016-05-02",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�"
+ },
+ {
+ date: "2016-05-04",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�"
+ },
+ {
+ date: "2016-05-01",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�"
+ }
+ ],
+ multipleSelection: [],
+ patientqueryParams: {},
+ dialogVisiblepatient: false,
+ patienttotal: 0, //
//绁ㄦ嵁鏂囦欢
pdftitle: "",
pdfimg: "",
@@ -404,6 +700,20 @@
{ required: true, message: "璇疯緭鍏ユ墍灞炰笟鍔$粍", trigger: "blur" }
]
},
+ topicoptions: [
+ {
+ value: "閫夐」1",
+ label: "榛勯噾绯�"
+ },
+ {
+ value: "閫夐」2",
+ label: "鍙岀毊濂�"
+ },
+ {
+ value: "閫夐」5",
+ label: "鍖椾含鐑ら腑"
+ }
+ ],
baselist: [],
donorList: [],
@@ -424,10 +734,7 @@
//鏂囦欢鍒楄〃
fileList: [],
fileListto: [],
- invoicefileList: [],
- invoicefileListto: [],
- invoicepdfimg: "",
- invoicepdfimgsrcList: [],
+
invoDatatop: [],
//浜哄憳绫诲埆
persontype: null,
@@ -490,8 +797,23 @@
return "鍏抽棴鎻愮ず";
}
},
-
+ handleSelectionChange(val) {
+ this.multipleSelection = val;
+ },
+ handleClosehz() {
+ this.dialogVisiblepatient = false;
+ },
+ handleQuery() {},
+ resetQuery() {},
handleUploadError() {},
+ // 寮规娣诲姞
+ AddDispatchpatients() {
+ this.dialogVisiblepatient = false;
+ },
+ // 鐐瑰嚮鏂板
+ handleAddpatient(row) {
+ this.dialogVisiblepatient = true;
+ },
// 鑾峰彇璇锋眰澶�
Getnetworkheader() {
let string = window.location.href;
@@ -503,19 +825,6 @@
this.Networkheader = string.slice(0, index + 4); // 鎴彇8032鍙婂叾鍓嶉儴瀛楃
}
},
- // 鍙戠エ鍒囨崲
- handleClick(tab, event) {
- if (this.activeName == 1) {
- this.pdftitle = "鍏�" + this.pdfimgsrcList.length + "椤�";
- } else {
- this.pdftitle = "鍏�" + this.invoicepdfimgsrcList.length + "椤�";
- }
- },
-
- getIndexInArray(arr, obj) {
- return arr.indexOf(obj);
- },
-
// 琛ㄥ崟閲嶇疆
reset() {
this.form = {
@@ -824,6 +1133,187 @@
}
});
return sums;
+ },
+ // 鏂囦欢------------------------
+ remove(file, fileList) {
+ const rbDetails = [...this.rbDetails];
+
+ this.fileListto.splice(this.fileListto.indexOf(file), 1);
+ rbDetails[this.atpresent].annexfilesList = this.fileListto;
+ },
+
+ uploadSccess(response, file, fileList) {
+ this.rbDetails;
+ const config = {
+ headers: { Authorization: "Bearer " + this.ICDtoken }
+ };
+ const pdfimg = this.Networkheader + "/prod-api" + response.fileName;
+ //鑾峰彇绁ㄦ嵁淇℃伅浣嶇疆
+ 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;
+ });
+
+ this.$modal.msgSuccess(response.msg);
+
+ console.log(this.fileListto, "鏂板鍚�");
+ if (!this.rbDetails[this.atpresent].annexfilesList) {
+ this.rbDetails[this.atpresent].annexfilesList = [];
+ }
+ this.rbDetails[this.atpresent].annexfilesList.push({
+ name: file.name,
+ url: response.fileName
+ });
+ this.pdftitle = "鍏�" + this.pdfimgsrcList.length + "椤�";
+ } else {
+ console.log(response.msg);
+ }
+ },
+
+ // 鐐瑰嚮绁ㄦ嵁
+ Filepopup(index, row) {
+ const config = {
+ headers: { Authorization: "Bearer " + this.ICDtoken }
+ };
+
+ this.tableDatatop = [];
+ this.fileListto = [];
+ this.invoicefileListto = [];
+ this.pdfimg = "";
+ this.invoicepdfimg = [];
+ this.pdfimgsrcList = [];
+ this.invoicepdfimgsrcList = [];
+ this.tableDatatop.push(row);
+ this.atpresent = index;
+ 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;
+ return fetch(pdfimg, config)
+ .then(response => response.blob())
+ .then(blob => {
+ return {
+ name: value.name,
+ url: URL.createObjectURL(blob)
+ };
+ })
+ .catch(error => {
+ console.error("Error loading image", error);
+ return null;
+ });
+ }
+ );
+
+ Promise.all(fetchPromises).then(fileListto => {
+ this.fileListto = fileListto.filter(item => item !== null);
+ this.pdfimg = this.fileListto[0].url;
+ console.log(this.pdfimg, "pdfimg");
+ this.pdfimgsrcList = this.fileListto.map(item => item.url);
+ });
+
+ this.previewpdf = true;
+ } else {
+ this.fileListto = [];
+ this.pdfimg = "";
+ this.pdftitle = "";
+ }
+
+ this.pdftitle = "鍏�" + this.pdfimgsrcList.length + "椤�";
+
+ console.log(this.fileListto, "this.fileListto");
+ console.log(this.rbDetails[index].annexfilesList, "annexfilesList");
+ },
+
+ // 鐐瑰嚮宸蹭笂浼犳枃浠�
+ downFile(item) {
+ 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;
+ }
+ },
+ getIndexInArray(arr, obj) {
+ return arr.indexOf(obj);
+ },
+ // 鍙戠エ鍒囨崲
+ handleClick(tab, event) {
+ this.pdftitle = "鍏�" + this.pdfimgsrcList.length + "椤�";
+ },
+ // 鐐瑰嚮鍒犻櫎
+ deletedowfile(row) {
+ console.log(row);
+ let indexvalue = "";
+ const indexlist = this.getIndexInArray(this.pdfimgsrcList, row.url);
+ this.pdfimgsrcList.splice(indexlist, 1);
+ const index = this.getIndexInArray(this.fileListto, row);
+ this.fileListto.splice(index, 1);
+ console.log(this.rbDetails[this.atpresent].annexfilesList);
+ indexvalue = this.rbDetails[this.atpresent].annexfilesList.findIndex(
+ item => item.name == row.name
+ );
+ console.log(indexvalue, "鍒犻櫎绱㈠紩");
+ this.rbDetails[this.atpresent].annexfilesList.splice(indexvalue, 1);
+ },
+ // 鐐瑰嚮涓婄Щ
+ moveupdowfile(row) {
+ const index = this.fileListto.findIndex(item => item.name == row.name);
+ 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 itemann = this.rbDetails[this.atpresent].annexfilesList.splice(
+ indexann,
+ 1
+ )[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
+ this.rbDetails[this.atpresent].annexfilesList.splice(
+ indexann - 1,
+ 0,
+ itemann
+ ); // 灏唅temann鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
+ console.log(indexann, "indexann");
+ console.log(index, "index");
+
+ console.log(
+ this.rbDetails[this.atpresent].annexfilesList,
+ "annexfilesList"
+ );
+ console.log(this.fileListto, "fileListto");
+ // console.log(this.rbDetails[this.atpresent].invoicefilesList,'invoicefilesList');
+ },
+ Downloadfile(row) {
+ window.location.href = row.url;
}
}
};
@@ -897,9 +1387,51 @@
text-align: center;
}
}
-.button-delete{
+.button-delete {
color: rgb(236, 69, 69);
}
+.examine-jic {
+ .headline {
+ font-size: 24px;
+ border-left: 5px solid #41a1be;
+ padding-left: 5px;
+ margin-bottom: 10px;
+ display: flex;
+ justify-content: space-between;
+ .Add-details {
+ font-size: 18px;
+ color: #02a7f0;
+ cursor: pointer;
+ }
+ }
+ .jic-value {
+ font-size: 20px;
+ border-top: 1px solid #a7abac;
+ padding: 10px;
+ margin-bottom: 10px;
+ .details-jic {
+ padding: 10px 15px;
+ border: 1px solid #dcdfe6;
+ -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
+ 0 0 6px 0 rgba(0, 0, 0, 0.04);
+ .details-title {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 10px;
+ div:nth-child(2) {
+ color: #02a7f0;
+ cursor: pointer;
+ }
+ }
+ .details-renw {
+ background: #e4ebfc;
+ padding: 15px 5px;
+ border-radius: 5px;
+ margin-bottom: 20px;
+ }
+ }
+ }
+}
::v-deep .el-input--medium .el-input__inner {
height: 36px;
--
Gitblit v1.9.3