| | |
| | | v-hasPermi="['system:donorcharge:edit']">ä¿®æ¹</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)" |
| | | v-hasPermi="['system:donorcharge:edit']">详æ
</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:donorcharge:remove']">å é¤</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> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | /* @import url(); å¼å
¥å
Œ
±cssç±» */ |
| | | .button-delete{ |
| | | color: rgb(236, 69, 69); |
| | | } |
| | | </style> |
| | |
| | | type="border-card" |
| | | @tab-click="handleClick" |
| | | > |
| | | <el-tab-pane label="æ®ééä»¶" :name="1"> |
| | | <el-tab-pane label="æ®ééä»¶" name="common"> |
| | | <div class="pdfimg"> |
| | | <div class="box-pdf"> |
| | | <div> |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="primary" |
| | | type="danger" |
| | | size="mini" |
| | | @click.native.prevent.stop="deletedowfile(scope.row)" |
| | | >å é¤</el-button |
| | |
| | | <div v-else class="pdfimgmins">{{ hintitle }}</div> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å票æä»¶" :name="2"> |
| | | <el-tab-pane label="å票æä»¶" name="invoice"> |
| | | <div class="pdfimg"> |
| | | <div class="box-pdf"> |
| | | <div> |
| | |
| | | invoicepdfimg: "", |
| | | invoicepdfimgsrcList: [], |
| | | invoDatatop: [], |
| | | activeName: 1, //æä»¶ç±»å |
| | | activeName: "common", //æä»¶ç±»å |
| | | //ä¸ä¼ éä»¶è·¯å¾ |
| | | uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", |
| | | ICDtoken: getToken(), |
| | |
| | | handleUploadError() {}, |
| | | remove(file, fileList) { |
| | | const rbDetails = [...this.rbDetails]; |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | this.fileListto.splice(this.fileListto.indexOf(file), 1); |
| | | rbDetails[this.atpresent].annexfilesList = this.fileListto; |
| | | } else { |
| | |
| | | }; |
| | | const pdfimg = this.Networkheader + "/prod-api" + response.fileName; |
| | | //è·å票æ®ä¿¡æ¯ä½ç½® |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | if (response.code == 200) { |
| | | this.previewpdf = true; |
| | | |
| | |
| | | this.tableDatatop.push(row); |
| | | this.atpresent = index; |
| | | this.pdfVisible = true; |
| | | console.log(this.fileListto, "this.fileListto"); |
| | | console.log(this.invoicefileListto, "this.invoicefileListto"); |
| | | |
| | | if (this.rbDetails[index].annexfilesList) { |
| | | this.rbDetails[index].annexfilesList.forEach((value, indexson) => { |
| | | const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | | // å°è·åçæ°æ®æµè½¬æ¢ä¸ºURL |
| | | this.fileListto.push({ |
| | | name: value.name, |
| | | url: URL.createObjectURL(blob) |
| | | // this.rbDetails[index].annexfilesList.forEach((value, indexson) => { |
| | | // const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | // fetch(pdfimg, config) |
| | | // .then(response => response.blob()) |
| | | // .then(blob => { |
| | | // // å°è·åçæ°æ®æµè½¬æ¢ä¸ºURL |
| | | // this.fileListto.push({ |
| | | // name: value.name, |
| | | // url: URL.createObjectURL(blob) |
| | | // }); |
| | | // if (this.fileListto.length == 1) { |
| | | // this.pdfimg = URL.createObjectURL(blob); |
| | | // } |
| | | // this.pdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | // }) |
| | | // .catch(error => { |
| | | // console.error("Error loading image", error); |
| | | // return; |
| | | // }); |
| | | // }); |
| | | |
| | | 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; |
| | | }); |
| | | if (this.fileListto.length == 1) { |
| | | this.pdfimg = URL.createObjectURL(blob); |
| | | } |
| | | this.pdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | }) |
| | | .catch(error => { |
| | | console.error("Error loading image", error); |
| | | return; |
| | | }); |
| | | } |
| | | ); |
| | | |
| | | 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 = []; |
| | |
| | | } |
| | | //å票 |
| | | if (this.rbDetails[index].invoicefilesList) { |
| | | this.rbDetails[index].invoicefilesList.forEach((value, indexson) => { |
| | | const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | | // å°è·åçæ°æ®æµè½¬æ¢ä¸ºURL |
| | | this.invoicefileListto.push({ |
| | | name: value.name, |
| | | url: URL.createObjectURL(blob) |
| | | const fetchPromises = this.rbDetails[index].invoicefilesList.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; |
| | | }); |
| | | if (this.invoicefileListto.length == 1) { |
| | | this.invoicepdfimg = URL.createObjectURL(blob); |
| | | } |
| | | this.invoicepdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | }) |
| | | .catch(error => { |
| | | console.error("Error loading image", error); |
| | | return; |
| | | }); |
| | | } |
| | | ); |
| | | |
| | | Promise.all(fetchPromises).then(invoicefileListto => { |
| | | this.invoicefileListto = invoicefileListto.filter(item => item !== null); |
| | | this.invoicepdfimg = this.invoicefileListto[0].url; |
| | | console.log(this.invoicepdfimg, "invoicepdfimg"); |
| | | this.invoicepdfimgsrcList = this.invoicefileListto.map(item => item.url); |
| | | }); |
| | | |
| | | this.previewpdf = true; |
| | | } else { |
| | | this.invoicefileListto = []; |
| | |
| | | this.pdftitle = ""; |
| | | } |
| | | |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | this.pdftitle = "å
±" + this.pdfimgsrcList.length + "项"; |
| | | } else { |
| | | this.pdftitle = "å
±" + this.invoicepdfimgsrcList.length + "项"; |
| | | } |
| | | console.log(this.fileListto, "this.fileListto"); |
| | | console.log(this.rbDetails[index].annexfilesList, "annexfilesList"); |
| | | }, |
| | | |
| | | // ç¹å»å·²ä¸ä¼ æä»¶ |
| | | downFile(item) { |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | this.pdftitle = |
| | | "å
±" + this.pdfimgsrcList.length + "项ï¼å½åéä¸" + item.name; |
| | | let name = item.name.split("."); |
| | |
| | | }, |
| | | // åç¥¨åæ¢ |
| | | handleClick(tab, event) { |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | this.pdftitle = "å
±" + this.pdfimgsrcList.length + "项"; |
| | | } else { |
| | | this.pdftitle = "å
±" + this.invoicepdfimgsrcList.length + "项"; |
| | |
| | | deletedowfile(row) { |
| | | console.log(row); |
| | | let indexvalue = ""; |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | 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.find( |
| | | (item, index) => { |
| | | return item.name == row.name; |
| | | } |
| | | indexvalue = this.rbDetails[this.atpresent].annexfilesList.findIndex( |
| | | item => item.name == row.name |
| | | ); |
| | | console.log(indexvalue, "å é¤ç´¢å¼"); |
| | | this.rbDetails[this.atpresent].annexfilesList.splice(indexvalue, 1); |
| | |
| | | const index = this.getIndexInArray(this.invoicefileListto, row); |
| | | this.invoicefileListto.splice(index, 1); |
| | | console.log(this.rbDetails[this.atpresent].invoicefilesList); |
| | | indexvalue = this.rbDetails[this.atpresent].invoicefilesList.find( |
| | | (item, index) => { |
| | | return item.name == row.name; |
| | | } |
| | | indexvalue = this.rbDetails[this.atpresent].invoicefilesList.findIndex( |
| | | item => item.name == row.name |
| | | ); |
| | | console.log(indexvalue, "å é¤ç´¢å¼"); |
| | | this.rbDetails[this.atpresent].invoicefilesList.splice(indexvalue, 1); |
| | |
| | | }, |
| | | // ç¹å»ä¸ç§» |
| | | moveupdowfile(row) { |
| | | if (this.activeName == 1) { |
| | | const index = this.getIndexInArray(this.fileListto, row); |
| | | if (this.activeName == "common") { |
| | | const index = this.fileListto.findIndex(item => item.name == row.name); |
| | | const item = this.fileListto.splice(index, 1)[0]; // ç§»é¤æå®ç´¢å¼å¤çå
ç´ ï¼å¹¶ä¿åå°itemåéä¸ |
| | | this.fileListto.splice(index - 1, 0, item); // å°itemæå
¥å°ç´¢å¼ä½ç½®çåä¸ä½ |
| | | const indexann = this.rbDetails[this.atpresent].annexfilesList.findIndex(item => item.name == row.name); |
| | | |
| | | const indexann = this.rbDetails[ |
| | | this.atpresent |
| | | ].annexfilesList.findIndex(item => item.name == row.name); |
| | | const itemann = this.rbDetails[this.atpresent].annexfilesList.splice( |
| | | indexann, |
| | | 1 |
| | |
| | | 0, |
| | | itemann |
| | | ); // å°itemannæå
¥å°ç´¢å¼ä½ç½®çåä¸ä½ |
| | | |
| | | console.log(indexann, "indexann"); |
| | | console.log(index, "index"); |
| | | } else { |
| | | const index = this.getIndexInArray(this.invoicefileListto, row); |
| | | const index = this.invoicefileListto.findIndex( |
| | | item => item.name == row.name |
| | | ); |
| | | |
| | | const item = this.invoicefileListto.splice(index, 1)[0]; // ç§»é¤æå®ç´¢å¼å¤çå
ç´ ï¼å¹¶ä¿åå°itemåéä¸ |
| | | this.invoicefileListto.splice(index - 1, 0, item); // å°itemæå
¥å°ç´¢å¼ä½ç½®çåä¸ä½ |
| | | |
| | | const indexinvo = this.rbDetails[this.atpresent].invoicefilesList.findIndex(item => item.name == row.name); |
| | | const indexinvo = this.rbDetails[ |
| | | this.atpresent |
| | | ].invoicefilesList.findIndex(item => item.name == row.name); |
| | | const iteminvo = this.rbDetails[this.atpresent].invoicefilesList.splice( |
| | | indexinvo, |
| | | 1 |
| | |
| | | this.tableDatatop = []; |
| | | this.fileListto = []; |
| | | this.invoicefileListto = []; |
| | | this.pdfimg = ''; |
| | | this.pdfimg = ""; |
| | | this.invoicepdfimg = []; |
| | | this.pdfimgsrcList = []; |
| | | this.invoicepdfimgsrcList = []; |
| | |
| | | this.pdfVisible = true; |
| | | |
| | | if (this.rbDetails[index].annexfilesList) { |
| | | this.rbDetails[index].annexfilesList.forEach((value, indexson) => { |
| | | const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | | // å°è·åçæ°æ®æµè½¬æ¢ä¸ºURL |
| | | this.fileListto.push({ |
| | | name: value.name, |
| | | url: URL.createObjectURL(blob) |
| | | |
| | | 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; |
| | | }); |
| | | if (this.fileListto.length == 1) { |
| | | this.pdfimg = URL.createObjectURL(blob); |
| | | } |
| | | this.pdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | }) |
| | | .catch(error => { |
| | | console.error("Error loading image", error); |
| | | return; |
| | | }); |
| | | } |
| | | ); |
| | | |
| | | 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 = []; |
| | |
| | | } |
| | | //å票 |
| | | if (this.rbDetails[index].invoicefilesList) { |
| | | this.rbDetails[index].invoicefilesList.forEach((value, indexson) => { |
| | | const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | | // å°è·åçæ°æ®æµè½¬æ¢ä¸ºURL |
| | | this.invoicefileListto.push({ |
| | | name: value.name, |
| | | url: URL.createObjectURL(blob) |
| | | const fetchPromises = this.rbDetails[index].invoicefilesList.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; |
| | | }); |
| | | if (this.invoicefileListto.length == 1) { |
| | | this.invoicepdfimg = URL.createObjectURL(blob); |
| | | } |
| | | this.invoicepdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | }) |
| | | .catch(error => { |
| | | console.error("Error loading image", error); |
| | | return; |
| | | }); |
| | | } |
| | | ); |
| | | |
| | | Promise.all(fetchPromises).then(invoicefileListto => { |
| | | this.invoicefileListto = invoicefileListto.filter(item => item !== null); |
| | | this.invoicepdfimg = this.invoicefileListto[0].url; |
| | | console.log(this.invoicepdfimg, "invoicepdfimg"); |
| | | this.invoicepdfimgsrcList = this.invoicefileListto.map(item => item.url); |
| | | }); |
| | | |
| | | this.previewpdf = true; |
| | | } else { |
| | | this.invoicefileListto = []; |
| | |
| | | this.pdftitle = ""; |
| | | } |
| | | |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | this.pdftitle = "å
±" + this.pdfimgsrcList.length + "项"; |
| | | } else { |
| | | this.pdftitle = "å
±" + this.invoicepdfimgsrcList.length + "项"; |
| | | } |
| | | console.log(this.fileListto, "this.fileListto"); |
| | | console.log(this.rbDetails[index].annexfilesList, "annexfilesList"); |
| | | }, |
| | | |
| | | // ç¹å»å·²ä¸ä¼ æä»¶ |
| | |
| | | this.tableDatatop = []; |
| | | this.fileListto = []; |
| | | this.invoicefileListto = []; |
| | | this.pdfimg = []; |
| | | this.pdfimg = ""; |
| | | this.invoicepdfimg = []; |
| | | this.pdfimgsrcList = []; |
| | | this.invoicepdfimgsrcList = []; |
| | |
| | | this.pdfVisible = true; |
| | | |
| | | if (this.rbDetails[index].annexfilesList) { |
| | | this.rbDetails[index].annexfilesList.forEach((value, indexson) => { |
| | | const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | | // å°è·åçæ°æ®æµè½¬æ¢ä¸ºURL |
| | | this.fileListto.push({ |
| | | name: value.name, |
| | | url: URL.createObjectURL(blob) |
| | | |
| | | 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; |
| | | }); |
| | | if (this.fileListto.length == 1) { |
| | | this.pdfimg = URL.createObjectURL(blob); |
| | | } |
| | | this.pdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | }) |
| | | .catch(error => { |
| | | console.error("Error loading image", error); |
| | | return; |
| | | }); |
| | | } |
| | | ); |
| | | |
| | | 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 = []; |
| | |
| | | } |
| | | //å票 |
| | | if (this.rbDetails[index].invoicefilesList) { |
| | | this.rbDetails[index].invoicefilesList.forEach((value, indexson) => { |
| | | const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | | // å°è·åçæ°æ®æµè½¬æ¢ä¸ºURL |
| | | this.invoicefileListto.push({ |
| | | name: value.name, |
| | | url: URL.createObjectURL(blob) |
| | | const fetchPromises = this.rbDetails[index].invoicefilesList.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; |
| | | }); |
| | | if (this.invoicefileListto.length == 1) { |
| | | this.invoicepdfimg = URL.createObjectURL(blob); |
| | | } |
| | | this.invoicepdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | }) |
| | | .catch(error => { |
| | | console.error("Error loading image", error); |
| | | return; |
| | | }); |
| | | } |
| | | ); |
| | | |
| | | Promise.all(fetchPromises).then(invoicefileListto => { |
| | | this.invoicefileListto = invoicefileListto.filter(item => item !== null); |
| | | this.invoicepdfimg = this.invoicefileListto[0].url; |
| | | console.log(this.invoicepdfimg, "invoicepdfimg"); |
| | | this.invoicepdfimgsrcList = this.invoicefileListto.map(item => item.url); |
| | | }); |
| | | |
| | | this.previewpdf = true; |
| | | } else { |
| | | this.invoicefileListto = []; |
| | |
| | | this.pdftitle = ""; |
| | | } |
| | | |
| | | if (this.activeName == 1) { |
| | | if (this.activeName == "common") { |
| | | this.pdftitle = "å
±" + this.pdfimgsrcList.length + "项"; |
| | | } else { |
| | | this.pdftitle = "å
±" + this.invoicepdfimgsrcList.length + "项"; |
| | | } |
| | | console.log(this.fileListto, "this.fileListto"); |
| | | console.log(this.rbDetails[index].annexfilesList, "annexfilesList"); |
| | | }, |
| | | |
| | | // ç¹å»å·²ä¸ä¼ æä»¶ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px"> |
| | | <el-form-item label="仿¬¾å»é¢" prop="name"> |
| | | <el-input v-model="queryParams.name" placeholder="请è¾å
¥å§å" clearable size="small" |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¶æ¬¾å¹´åº¦" prop="donationcategory"> |
| | | <el-input v-model="queryParams.donationcategory" placeholder="请è¾å
¥æç®ç±»å«" clearable size="small" |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¶æ¬¾ç¶æ" prop="chargeamount"> |
| | | <el-input v-model="queryParams.chargeamount" placeholder="请è¾å
¥è´¹ç¨éé¢" clearable size="small" |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['system:donorcharge:add']">æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" |
| | | v-hasPermi="['system:donorcharge:edit']">ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" |
| | | v-hasPermi="['system:donorcharge:remove']">å é¤</el-button> |
| | | </el-col> |
| | | |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="donorchargeList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="ç³è¯·æ¶é´" align="center" prop="donatetime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.donatetime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¶æ¬¾åå·" align="center" prop="donateno" /> |
| | | <el-table-column label="仿¬¾å»é¢" align="center" prop="name" /> |
| | | <el-table-column label="æ¶æ¬¾ç¶æ" align="center" prop="donationcategory" /> |
| | | <el-table-column label="åºæ¶éé¢" align="center" prop="donateorgan" /> |
| | | <el-table-column label="å·²æ¶éé¢" align="center" prop="chargeamounted" /> |
| | | <el-table-column label="æ¶æ¬¾æ¥æ" align="center" prop="chargeamount" /> |
| | | <el-table-column label="ç»å人" align="center" prop="agent" /> |
| | | <el-table-column label="æä½" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:donorcharge:edit']">ä¿®æ¹</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(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> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹æç®æ¡ä¾å¨å®åå¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" append-to-body align="center" :close-on-click-modal="false" |
| | | width="1200px"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="12"><el-form-item label="OPOç¼å·" prop="donateno"> |
| | | <el-input v-model="form.donateno" placeholder="请è¾å
¥OPOç¼å·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="å§å" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥å§å" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æç®æ¶é´" prop="donatetime"> |
| | | <el-date-picker clearable size="small" v-model="form.donatetime" type="date" value-format="yyyy-MM-dd" |
| | | style="width: 174px" placeholder="éæ©æç®æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"><el-form-item label="åºçå¹´æ" prop="borthdate"> |
| | | <el-date-picker clearable size="small" v-model="form.borthdate" type="date" value-format="yyyy-MM-dd" |
| | | style="width: 174px" placeholder="éæ©åºçå¹´æ"> |
| | | </el-date-picker> |
| | | </el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="å¹´é¾" prop="age"> |
| | | <el-input v-model="form.age" placeholder="请è¾å
¥å¹´é¾" /> |
| | | </el-form-item></el-col> |
| | | <el-col :span="6"> <el-form-item label="æ§å«" prop="sex"> |
| | | <el-select v-model="form.sex" placeholder="è¯·éæ©æ§å«"> |
| | | <el-option label="è¯·éæ©åå
¸çæ" value="" /> |
| | | </el-select> |
| | | </el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="æç®ç±»å«" prop="donationcategory"> |
| | | <el-input v-model="form.donationcategory" placeholder="请è¾å
¥æç®ç±»å«" /> |
| | | </el-form-item></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"><el-form-item label="æç®æ¡ä¾ID" prop="infoid"> |
| | | <el-input v-model="form.infoid" placeholder="请è¾å
¥æç®æ¡ä¾ID" /> |
| | | </el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="æç®å¨å®" prop="donateorgan"> |
| | | <el-input v-model="form.donateorgan" placeholder="请è¾å
¥æç®çå¨å®" /> |
| | | </el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="åºæ¶è´¹ç¨" prop="chargeamount"> |
| | | <el-input v-model="form.chargeamount" placeholder="请è¾å
¥åºæ¶è´¹ç¨" /> |
| | | </el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="å·²æ¶è´¹ç¨" prop="chargeamounted"> |
| | | <el-input v-model="form.chargeamounted" placeholder="请è¾å
¥å·²æ¶è´¹ç¨" /> |
| | | </el-form-item></el-col> |
| | | </el-row><el-row> |
| | | <el-col :span="24"><el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table :data="donorchargerogans" v-loading="loading" max-height="1200" border highlight-current-row> |
| | | <el-table-column prop="orderno" align="center" label="åºå·" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.orderno" placeholder="åºå·" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organno" align="center" label="å¨å®ç¼å·" width="90"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organno" placeholder="å¨å®ç¼å·" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organname" align="center" label="å¨å®åç§°" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organname" placeholder="å¨å®åç§°" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="hospitalname" align="center" label="æ¥æ¶å»é¢" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.hospitalname" placeholder="æ¥æ¶å»é¢" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amounttime" align="center" label="æ¥æ¶æ¶é´" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.amounttime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="æ¥æ¶æ¶é´"> |
| | | </el-date-picker> </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amount" align="center" label="å·²æ¶è´¹ç¨" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.amount" placeholder="å·²æ¶è´¹ç¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amounttime" align="center" label="æ¶æ¬¾æ¶é´" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.amounttime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="æ¶æ¬¾æ¶é´" @blur="getdays(scope.row)"> |
| | | </el-date-picker> </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organcharge" align="center" label="æ åè´¹ç¨" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organcharge" placeholder="å·²æ¶è´¹ç¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" label="夿³¨"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="夿³¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="showSelectionDialog" :close-on-click-modal="false" :title="'è¯·éæ©æç®æ¡ä¾'" width="500px" |
| | | style="text-align: center" v-loading="loading"> |
| | | <el-form ref="selectionForm" :model="selectionForm"> |
| | | <el-row> |
| | | <el-form-item label="æç®è
ååï¼" prop="donorname" label-width="120px"> |
| | | <el-select v-model="selectionForm.donorid" filterable reserve-keyword default-first-option |
| | | placeholder="请è¾å
¥æç®è
çå§å" style="width: 100%"> |
| | | <el-option v-for="item in donorlist" :key="item.donorid" :label="item.donorname" :value="item.donorid"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="showSelectionDialog = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmSelection()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import { listDonorcharge, getDonorcharge, delDonorcharge, addDonorcharge, updateDonorcharge, exportDonorcharge, listDonorchargeorgan, delDonorchargeorgan, addDonorchargeorgan, updateDonorchargeorgan, exportDonorchargeorgan } from "@/api/project/donorcharge"; |
| | | export default { |
| | | name: "Donorcharge", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // 导åºé®ç½©å± |
| | | exportLoading: false, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | //å½åæ¡ä¾id |
| | | curInfoId: 0, |
| | | // æç®æ¡ä¾å¨å®åè¡¨æ ¼æ°æ® |
| | | donorchargeList: [], |
| | | donorchargerogans: [], |
| | | //æç®æ¡ä¾éæ© |
| | | showSelectionDialog: false, |
| | | donorlist: [], |
| | | donorinfolist: [], |
| | | selectionForm: { |
| | | index: null, |
| | | donorid: null, |
| | | donorname: null |
| | | }, |
| | | loadingdonorlist: false, |
| | | |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢è´¹ç¨è¡¨åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | infoid: null, |
| | | name: null, |
| | | donationcategory: null, |
| | | donateorgan: null, |
| | | chargeamounted: null, |
| | | }, |
| | | //æ¥è¯¢æ¡ä¾åæ° |
| | | donorParams: { |
| | | pageNum: 1, |
| | | pageSize: 1000, |
| | | }, |
| | | // æ¥è¯¢è´¹ç¨å¨å®è¡¨åæ° |
| | | organParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | donorchargeid: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | |
| | | methods: { |
| | | //ä¸å®¶/å»çæºæ/è´¹ç¨æ¥éæºæéæ© |
| | | confirmSelection() { |
| | | var curdonorinfo = null; |
| | | //仿¡ä¾å表è·åä¿¡æ¯ |
| | | this.donorinfolist.map(item => { |
| | | if (this.selectionForm.donorid == item.id) { |
| | | curdonorinfo = item; |
| | | } |
| | | }); |
| | | this.showSelectionDialog = false; |
| | | this.$router.push({ |
| | | path: "/cost/particulars", |
| | | query: { id: 0, operation: "add", data: curdonorinfo } |
| | | }); |
| | | }, |
| | | |
| | | /** æ¥è¯¢æç®æ¡ä¾å¨å®åå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listDonorcharge(this.queryParams).then(response => { |
| | | this.donorchargeList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | infoid: null, |
| | | donateno: null, |
| | | donatetime: null, |
| | | name: null, |
| | | borthdate: null, |
| | | sex: null, |
| | | age: null, |
| | | donationcategory: null, |
| | | donateorgan: null, |
| | | chargeamount: null, |
| | | chargeamounted: null, |
| | | remark: null, |
| | | delFlag: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length !== 1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.selectionForm.index = null; |
| | | this.selectionForm.donorid = null; |
| | | this.selectionForm.donorname = null; |
| | | |
| | | if (this.donorlist[0]) { |
| | | this.showSelectionDialog = true; |
| | | } |
| | | else { |
| | | //è·åæç®æ¡ä¾å表 |
| | | if (this.donorlist.length > 0) { } |
| | | else { |
| | | this.loading = true; |
| | | listDonatebaseinfo(this.donorParams).then(res => { |
| | | // this.donorinfolist = res.rows; |
| | | res.rows.forEach(item => { |
| | | if (item.workflow >= 6) { |
| | | this.donorinfolist.push(item); |
| | | } |
| | | }); |
| | | |
| | | this.donorinfolist.forEach(item1 => { |
| | | this.donorlist.push({ |
| | | donorid: item1.id, |
| | | donorname: item1.name |
| | | }); |
| | | }); |
| | | console.log(this.donorinfolist,' this.donorinfolist'); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | |
| | | this.showSelectionDialog = true; |
| | | }; |
| | | |
| | | /** |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æç®æ¡ä¾å¨å®è´¹ç¨æ
åµ"; |
| | | this.donorchargerogans = []; |
| | | */ |
| | | }, |
| | | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.$router.push({ |
| | | path: "/cost/particulars", |
| | | query: { id: row.id, operation: "update", data: row } |
| | | }); |
| | | }, |
| | | |
| | | /** 详æ
æ¥çæé®æä½ */ |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: "/cost/particulars", |
| | | query: { id: row.id, operation: "detail", data: row } |
| | | }); |
| | | }, |
| | | |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤æç®æ¡ä¾å¨å®åç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function () { |
| | | return delDonorcharge(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => { }); |
| | | }, |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å¯¼åºæææç®æ¡ä¾å¨å®åæ°æ®é¡¹ï¼').then(() => { |
| | | this.exportLoading = true; |
| | | return exportDonorcharge(queryParams); |
| | | }).then(response => { |
| | | this.$download.name(response.msg); |
| | | this.exportLoading = false; |
| | | }).catch(() => { }); |
| | | }, |
| | | |
| | | /** æäº¤æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateDonorcharge(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addDonorcharge(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | /* @import url(); å¼å
¥å
Œ
±cssç±» */ |
| | | .button-delete{ |
| | | color: rgb(236, 69, 69); |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="Modifydetailscla"> |
| | | <div class="boxdiv"> |
| | | <div class="top-text">{{ title }}</div> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="ç»å人" prop="name"> |
| | | <el-input |
| | | v-model="form.name" |
| | | placeholder="请è¾å
¥å§å" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ¶æ¬¾ç¶æ" prop="sex"> |
| | | <el-select v-model="form.sex" placeholder="请è¾å
¥æ§å«"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_user_sex" |
| | | :key="dict.label" |
| | | :label="dict.label" |
| | | :value="parseInt(dict.value)" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="5"> |
| | | <el-form-item label="ç³è¯·æ¥æ" prop="borthdate"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | v-model="form.borthdate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="éæ©åºçå¹´æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> </el-row |
| | | ><el-row |
| | | ><el-col :span="5" |
| | | ><el-form-item label="æ¶æ¬¾åä½" prop="donateno"> |
| | | <el-input |
| | | v-model="form.donateno" |
| | | placeholder="请è¾å
¥æ¶æ¬¾åä½" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7" |
| | | ><el-form-item label="æ¶æ¬¾é¶è¡" prop="donateno"> |
| | | <el-input |
| | | v-model="form.donateno" |
| | | placeholder="请è¾å
¥æ¶æ¬¾é¶è¡" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="5"> |
| | | <el-form-item label="æ¶æ¬¾è¡å·" prop="donationcategory"> |
| | | <el-input |
| | | v-model="form.donationcategory" |
| | | placeholder="请è¾å
¥æ¶æ¬¾è¡å·" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="17"> |
| | | <el-form-item label="è系信æ¯" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="仿¬¾å»é¢" prop="sex"> |
| | | <el-select v-model="form.sex" placeholder="è¯·éæ©å»é¢"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_user_sex" |
| | | :key="dict.label" |
| | | :label="dict.label" |
| | | :value="parseInt(dict.value)" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="åºæ¶éé¢" prop="chargeamount"> |
| | | <el-input |
| | | v-model="form.chargeamount" |
| | | placeholder="请è¾å
¥åºæ¶éé¢" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="宿¶éé¢" prop="chargeamounted"> |
| | | <el-input |
| | | v-model="form.chargeamounted" |
| | | placeholder="请è¾å
¥å®æ¶éé¢" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="ç³è¯·æ¥æ" prop="borthdate"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | v-model="form.borthdate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="éæ©åºçå¹´æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px"> |
| | | <el-table |
| | | :data="donorchargeorgans" |
| | | ref="table" |
| | | border |
| | | max-height="800" |
| | | highlight-current-row |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | > |
| | | <el-table-column |
| | | prop="organno" |
| | | align="center" |
| | | label="å¨å®ç¼å·" |
| | | width="90" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.organno" |
| | | placeholder="å¨å®ç¼å·" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="organname" |
| | | align="center" |
| | | label="å¨å®åç§°" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.organname" |
| | | placeholder="å¨å®åç§°" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="å½å®¶ç¼å·" |
| | | align="center" |
| | | width="120" |
| | | prop="caseno" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.caseno" placeholder="å½å®¶ç¼å·" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="hospitalname" |
| | | align="center" |
| | | label="æ¥æ¶å»é¢" |
| | | width="280" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <org-selecter |
| | | ref="tranHosSelect" |
| | | :org-type="'4'" |
| | | v-model="scope.row.hospitalno" |
| | | style="width: 100%" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="åä½å§æ°" |
| | | align="center" |
| | | width="120" |
| | | prop="name" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.name" placeholder="åä½å§æ°" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="organtime" |
| | | align="center" |
| | | label="æ¥æ¶æ¥æ" |
| | | width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.organtime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="æ¥æ¶æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | |
| | | <el-table-column |
| | | prop="amount" |
| | | align="center" |
| | | label="åºæ¶éé¢" |
| | | width="150" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.amount" placeholder="åºæ¶éé¢" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="amount" |
| | | align="center" |
| | | label="宿¶éé¢" |
| | | width="150" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.amount" placeholder="宿¶éé¢" /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="amounttime" |
| | | align="center" |
| | | label="æ¶æ¬¾æ¥æ" |
| | | width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.amounttime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="æ¶æ¬¾æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organchargedesc" align="center" label="夿³¨"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | 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> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitForm" |
| | | v-if="operationType == 'add' || operationType == 'update'" |
| | | >ä¿ å</el-button |
| | | > |
| | | <el-button type="primary" @click="cancel">å
³é</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pdf from "vue-pdf"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import { regionDataPlus, CodeToText } from "element-china-area-data"; |
| | | import { |
| | | getDonorcharge, |
| | | addDonorcharge, |
| | | updateDonorcharge |
| | | } from "@/api/project/donorcharge"; |
| | | import { |
| | | listDonorchargeorgan, |
| | | delDonorchargeorgan, |
| | | saveDonorchargeorgan |
| | | } from "@/api/project/donorcharge"; |
| | | import { listDonatecomporgan } from "@/api/project/donatecompletioninfo"; |
| | | import { listOrgancharge } from "@/api/project/organcharge"; |
| | | import OrgSelecter from "@/views/project/components/orgselect"; |
| | | import Li_area_select from "@/components/Address"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import debounce from "lodash/debounce"; |
| | | export default { |
| | | components: { |
| | | Treeselect, |
| | | OrgSelecter, |
| | | Li_area_select, |
| | | pdf |
| | | }, |
| | | dicts: ["sys_user_sex", "sys_0_1"], |
| | | name: "Donorchargemanager", |
| | | data() { |
| | | return { |
| | | activeName: 1, //æä»¶ç±»å |
| | | // é¨é¨æ é项 |
| | | |
| | | //ç¥¨æ®æä»¶ |
| | | pdftitle: "", |
| | | pdfimg: "", |
| | | pdfVisible: false, |
| | | costtypeobj: { |
| | | value: 0, |
| | | label: "" |
| | | }, |
| | | pdfimgsrcList: [], |
| | | Savereminder: false, //æéä¿åå¼¹æ¡ |
| | | Reminderquantity: 0, //æéæ°é |
| | | totalquantity: 0, //æ»æ°é |
| | | |
| | | hintitle: "éä¸å·¦ä¾§å·²ä¸ä¼ æä»¶é¢è§æ¥ç", |
| | | atpresent: "", |
| | | iframeurl: "", |
| | | options: regionDataPlus, |
| | | selectedOptions: [], |
| | | value1: "", |
| | | previewpdf: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // 导åºé®ç½©å± |
| | | exportLoading: false, |
| | | // ç½ç»è¯·æ±å¤´ |
| | | Networkheader: null, |
| | | |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // æç®æ¡ä¾å¨å®åè¡¨æ ¼æ°æ® |
| | | donorchargeList: [], |
| | | donorchargeorgans: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢è´¹ç¨è¡¨åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | infoid: null, |
| | | name: null, |
| | | donationcategory: null, |
| | | donateorgan: null, |
| | | chargeamounted: null |
| | | }, |
| | | // æ¥è¯¢è´¹ç¨å¨å®è¡¨åæ° |
| | | organParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | donorchargeid: null |
| | | }, |
| | | |
| | | // å½åç¨æ·ä¿¡æ¯ |
| | | userprofile: {}, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // åè¡¨åæ° |
| | | table: {}, |
| | | reimbursementList: [], |
| | | |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | reason: [ |
| | | { required: true, message: "请è¾å
¥åºå·®äºç±", trigger: "blur" } |
| | | ], |
| | | deptmentname: [ |
| | | { required: true, message: "请è¾å
¥æå±ä¸å¡ç»", trigger: "blur" } |
| | | ] |
| | | }, |
| | | |
| | | baselist: [], |
| | | donorList: [], |
| | | organchargelist: [], |
| | | standardlevel: 0, |
| | | defaultperson: {}, |
| | | fundflowList: [], |
| | | showApproveRecordDialog: false, |
| | | |
| | | // å½ååæ®ID |
| | | curId: 0, |
| | | curCase: null, |
| | | //ä¸å¡æä½ç±»å |
| | | operationType: "edit", |
| | | |
| | | //ä¸ä¼ å票æä»¶è·¯å¾ |
| | | uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", |
| | | //æä»¶å表 |
| | | fileList: [], |
| | | fileListto: [], |
| | | invoicefileList: [], |
| | | invoicefileListto: [], |
| | | invoicepdfimg: "", |
| | | invoicepdfimgsrcList: [], |
| | | invoDatatop: [], |
| | | //人åç±»å« |
| | | persontype: null, |
| | | |
| | | headers: { |
| | | Authorization: "Bearer " + getToken() |
| | | }, |
| | | |
| | | jurisdiction: false, |
| | | |
| | | //ä¿åæé®æ§å¶ |
| | | idisabled: false |
| | | }; |
| | | }, |
| | | |
| | | created() { |
| | | console.log(234); |
| | | this.Getnetworkheader(); |
| | | |
| | | //è·åç»å½è
ä¿¡æ¯ |
| | | getUserProfile().then(response => { |
| | | this.userprofile = response.data; |
| | | this.defaultperson = response.data; |
| | | this.standardlevel = response.data.standardlevel; |
| | | }); |
| | | |
| | | //è·ååæ° |
| | | this.getroute(); |
| | | }, |
| | | |
| | | mounted() { |
| | | window.addEventListener("beforeunload", e => this.beforeunloadHandler(e)); |
| | | }, |
| | | |
| | | updated() { |
| | | this.$nextTick(() => { |
| | | this.$refs["table"].doLayout(); |
| | | }); |
| | | }, |
| | | |
| | | destroyed() { |
| | | window.removeEventListener("beforeunload", e => this.beforeunloadFn(e)); |
| | | }, //çå½å¨æ - 鿝宿 |
| | | |
| | | methods: { |
| | | // æµè§å¨é¡µé¢å
³éæå·æ°æç¤º |
| | | beforeunloadHandler(e) { |
| | | if ( |
| | | (JSON.stringify(this.form) == sessionStorage.getItem("apiform") && |
| | | JSON.stringify(this.donorchargeorgans) == |
| | | sessionStorage.getItem("apifunddetail")) || |
| | | !sessionStorage.getItem("apifunddetail") |
| | | ) { |
| | | } else { |
| | | this._beforeUnload_time = new Date().getTime(); |
| | | e = e || window.event; |
| | | if (e) { |
| | | e.returnValue = "å
³éæç¤º"; |
| | | } |
| | | return "å
³éæç¤º"; |
| | | } |
| | | }, |
| | | |
| | | handleUploadError() {}, |
| | | // è·å请æ±å¤´ |
| | | 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åå
¶åé¨å符 |
| | | } |
| | | }, |
| | | // åç¥¨åæ¢ |
| | | 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 = { |
| | | id: null, |
| | | infoid: null, |
| | | donateno: null, |
| | | donatetime: null, |
| | | name: null, |
| | | borthdate: null, |
| | | sex: null, |
| | | age: null, |
| | | donationcategory: null, |
| | | donateorgan: null, |
| | | chargeamount: null, |
| | | chargeamounted: null, |
| | | remark: null, |
| | | delFlag: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | |
| | | /** éè¿åæ°è·åä¸å¡ç±»å */ |
| | | getroute() { |
| | | //éæ©ä¸å¡ç±»å:1ãæ°å¢ï¼2ãä¿®æ¹ï¼3ãæ¥ç |
| | | this.operationType = this.$route.query.operation; |
| | | this.curId = this.$route.query.id; |
| | | this.curCase = this.$route.query.data; |
| | | console.log("this.$route.query", this.$route.query); |
| | | |
| | | if (this.operationType == "add") { |
| | | this.title = "æ°å»ºæ¡ä¾å¨å®è´¹ç¨è¡¨"; |
| | | this.handleAdd(); |
| | | console.log("1"); |
| | | } else if (this.operationType == "update") { |
| | | this.title = "ä¿®æ¹æ¡ä¾å¨å®è´¹ç¨è¡¨"; |
| | | this.handleUpdate(); |
| | | console.log("2"); |
| | | } else if (this.operationType == "detail") { |
| | | this.title = "æ¥çæ¡ä¾å¨å®è´¹ç¨è¡¨"; |
| | | this.handleDetail(); |
| | | console.log("3"); |
| | | } |
| | | }, |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.$store.dispatch("tagsView/delView", this.$route); |
| | | this.$router.go(-1); |
| | | }, |
| | | |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ°å¢æç®æ¡ä¾å¨å®è´¹ç¨è¡¨"; |
| | | |
| | | if (this.curCase) { |
| | | this.form.infoid = this.curCase.id; |
| | | this.form.donateno = this.curCase.donorno; |
| | | this.form.donatetime = this.curCase.donatetime; |
| | | this.form.name = this.curCase.name; |
| | | this.form.borthdate = this.curCase.birthday; |
| | | this.form.sex = this.curCase.sex; |
| | | this.form.age = this.curCase.age; |
| | | this.form.donationcategory = this.curCase.donationcategory; |
| | | |
| | | //è·å宿ç»è®°çå¨å®è¡¨ |
| | | if (this.curCase.id > 0) { |
| | | } else { |
| | | this.curCase.id = 0; |
| | | } |
| | | let searchParam = { |
| | | infoid: this.curCase.id |
| | | }; |
| | | listDonatecomporgan(searchParam).then(res => { |
| | | if (res.code == 200) { |
| | | // æ¥è¯¢å¨å®è´¹ç¨è¡¨ |
| | | let tempParam = { |
| | | organcode: null, |
| | | organname: null, |
| | | charge: null |
| | | }; |
| | | listOrgancharge(tempParam).then(res1 => { |
| | | if (res1.code == 200) { |
| | | this.organchargelist = res1.rows; |
| | | } |
| | | |
| | | //æå
¥å¨å®è¡¨ |
| | | res.rows.forEach(item => { |
| | | //è·åè´¹ç¨éé¢ |
| | | this.organchargelist.map(rescharge => { |
| | | if (rescharge.organcode == item.organno) { |
| | | this.donorchargeorgans.push({ |
| | | organno: item.organno, |
| | | organname: item.organname, |
| | | organcharge: rescharge.charge, |
| | | infoid: item.infoid, |
| | | hospitalname: item.transplanthospitalname, |
| | | hospitalno: item.transplanthospitalno, |
| | | organtime: item.transplanttime, |
| | | chargestate: "0" |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹æç®æ¡ä¾å¨å®è´¹ç¨è¡¨"; |
| | | |
| | | getDonorcharge(this.curId).then(response => { |
| | | this.form = response.data; |
| | | console.log("getDonorcharge", response); |
| | | |
| | | //å¨å®è´¹ç¨ä¿¡æ¯ |
| | | this.organParams.donorchargeid = this.curId; |
| | | console.log("this.organParams", this.organParams); |
| | | listDonorchargeorgan(this.organParams).then(res => { |
| | | console.log("listDonorchargeorgan", res); |
| | | this.donorchargeorgans = res.rows; |
| | | console.log(this.donorchargeorgans, "donorchargeorgans"); |
| | | if (this.donorchargeorgans.length > 0) { |
| | | } else { |
| | | this.addRow(0); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** ä¿®æ¹æ¥çæä½ */ |
| | | handleDetail() { |
| | | this.reset(); |
| | | this.open = true; |
| | | |
| | | getDonorcharge(this.curId).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "æ¥çæç®æ¡ä¾å¨å®è´¹ç¨è¡¨"; |
| | | |
| | | //å¨å®è´¹ç¨ä¿¡æ¯ |
| | | this.organParams.donorchargeid = this.curId; |
| | | listDonorchargeorgan(this.organParams).then(res => { |
| | | this.donorchargeorgans = res.rows; |
| | | if (this.donorchargeorgans.length > 0) { |
| | | } else { |
| | | this.addRow(0); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** æäº¤ä¿åæé® */ |
| | | submitForm: debounce(function(data) { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | //æ ¡éªãè´¹ç¨å计 |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | let organname = ""; |
| | | |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | organname += this.donorchargeorgans[i].organname + ","; |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | this.form.donateorgan = organname.substring( |
| | | 0, |
| | | organname.lastIndexOf(",") |
| | | ); |
| | | this.form.chargeamount = ChargeSum.toFixed(2); |
| | | this.form.chargeamounted = ChargeamountSum.toFixed(2); |
| | | } catch {} |
| | | |
| | | //ä¿å |
| | | if (this.form.id != null) { |
| | | for (let k = 0; k < this.donorchargeorgans.length; k++) { |
| | | this.donorchargeorgans[k].donorchargeID = this.form.id; |
| | | } |
| | | |
| | | updateDonorcharge(this.form).then(res1 => { |
| | | if (res1.code == 200) { |
| | | saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { |
| | | if (res2.code == 200) { |
| | | this.$modal.msgSuccess("ä¿åæåï¼"); |
| | | this.open = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | addDonorcharge(this.form).then(response => { |
| | | if (response.code == 200) { |
| | | console.log("addDonorcharge", response); |
| | | //ä¿ååæ ¡éªæ°æ® |
| | | for (let k = 0; k < this.donorchargeorgans.length; k++) { |
| | | this.donorchargeorgans[k].donorchargeid = response.data.id; |
| | | } |
| | | saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { |
| | | if (res2.code == 200) { |
| | | this.$modal.msgSuccess("ä¿åæåï¼"); |
| | | this.open = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, 500), |
| | | |
| | | //计ç®è´¹ç¨å计 |
| | | chargeSum() { |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | |
| | | //è´¹ç¨å计 |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | |
| | | this.form.chargeamount = ChargeSum.toFixed(2); |
| | | this.form.chargeamounted = ChargeamountSum.toFixed(2); |
| | | } catch {} |
| | | }, |
| | | |
| | | //è¡¨æ ¼å计 |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | var columnnames = [ |
| | | "organno", |
| | | "organname", |
| | | "amount", |
| | | "amounttime", |
| | | "organcharge", |
| | | "hospitalname", |
| | | "organtime", |
| | | "remark" |
| | | ]; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = "å计"; |
| | | return; |
| | | } |
| | | // if (index === 2) { |
| | | // sums[index] = this.form.chargeamounted; |
| | | // return; |
| | | // } |
| | | // if (index === 4) { |
| | | // sums[index] = this.form.chargeamount; |
| | | // return; |
| | | // } |
| | | //å»é¤é¨ååæ®µè®¡ç® |
| | | if (columnnames.indexOf(column.property) > -1) { |
| | | return; |
| | | } |
| | | |
| | | const values = data.map(item => Number(item[column.property])); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr); |
| | | if (!isNaN(value)) { |
| | | return prev + curr; |
| | | } else { |
| | | return prev; |
| | | } |
| | | }, 0); |
| | | sums[index] = sums[index].toFixed(2); // ä¿ç2ä½å°æ°ï¼è§£å³å°æ°å计å; |
| | | } else { |
| | | sums[index] = ""; |
| | | } |
| | | }); |
| | | return sums; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .Modifydetailscla { |
| | | padding: 10px; |
| | | |
| | | .boxdiv { |
| | | font-size: 18px; |
| | | padding: 0 30px; |
| | | padding-bottom: 60px; |
| | | |
| | | .top-text { |
| | | text-align: center; |
| | | |
| | | font-size: 23px; |
| | | font-weight: 600; |
| | | margin: 20px 0; |
| | | margin-bottom: 50px; |
| | | } |
| | | |
| | | .dialog-footer { |
| | | text-align: left; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .upload-demo { |
| | | text-align: center; |
| | | } |
| | | |
| | | .pdfimg { |
| | | display: flex; // text-align: center; |
| | | width: 100%; |
| | | height: 600px; |
| | | |
| | | .box-pdf { |
| | | width: 400px; |
| | | padding-top: 20px; |
| | | margin-right: 30px; |
| | | 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); |
| | | box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix. |
| | | } |
| | | |
| | | .pdftit { |
| | | width: 200px; |
| | | padding: 20px; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .pdftit:hover { |
| | | background: #c0cef7; |
| | | } |
| | | |
| | | .pdfimgmin { |
| | | width: 60%; |
| | | |
| | | img { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .pdfimgmins { |
| | | font-size: 28px; |
| | | width: 60%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .button-delete{ |
| | | color: rgb(236, 69, 69); |
| | | } |
| | | |
| | | ::v-deep .el-input--medium .el-input__inner { |
| | | height: 36px; |
| | | line-height: 36px; |
| | | text-align: center; |
| | | } |
| | | |
| | | ::v-deep .el-alert__title { |
| | | font-size: 20px; |
| | | line-height: 20px; |
| | | } |
| | | </style> |