| @@ -2005,15 +2005,6 @@ export const constantRoutes = [ | |||||
| }, | }, | ||||
| component: (resolve) => require(['@/views/yinnong/personalPicture'], resolve) | component: (resolve) => require(['@/views/yinnong/personalPicture'], resolve) | ||||
| }, | }, | ||||
| { | |||||
| path: '/yinnong/done', | |||||
| name: 'yinnongDone', | |||||
| meta: { | |||||
| title: '我的已办', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/yinnong/done'], resolve) | |||||
| }, | |||||
| { | { | ||||
| path: '/yinnong/doneCompleted/doneNew', | path: '/yinnong/doneCompleted/doneNew', | ||||
| name: 'yinnongDoneCompletedDoneNew', | name: 'yinnongDoneCompletedDoneNew', | ||||
| @@ -2023,15 +2014,6 @@ export const constantRoutes = [ | |||||
| }, | }, | ||||
| component: (resolve) => require(['@/views/yinnong/doneCompleted/doneNew'], resolve) | component: (resolve) => require(['@/views/yinnong/doneCompleted/doneNew'], resolve) | ||||
| }, | }, | ||||
| { | |||||
| path: '/yinnong/doneCompleted/completed', | |||||
| name: 'yinnongDoneCompletedCompleted', | |||||
| meta: { | |||||
| title: '我的待办', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/yinnong/doneCompleted/completed'], resolve) | |||||
| }, | |||||
| { | { | ||||
| path: '/yinnong/doneCompleted/completedNew', | path: '/yinnong/doneCompleted/completedNew', | ||||
| name: 'yinnongDoneCompletedCompletedNew', | name: 'yinnongDoneCompletedCompletedNew', | ||||
| @@ -181,16 +181,16 @@ | |||||
| }, | }, | ||||
| changeInform(val){ | changeInform(val){ | ||||
| console.log(val) | |||||
| var that = this; | var that = this; | ||||
| var str = val; | var str = val; | ||||
| var numArr = str.match(/\d+/g) | var numArr = str.match(/\d+/g) | ||||
| var nameArr = str.match(/[\u4e00-\u9fa5]/g).join("") | |||||
| console.log(numArr) | |||||
| console.log(nameArr) | |||||
| var nameArr = str.match(/[\u4e00-\u9fa5]/g); | |||||
| if(nameArr != null){ | |||||
| nameArr = nameArr.join("") | |||||
| } | |||||
| if (numArr) { | if (numArr) { | ||||
| numArr.map(rr=>{ | numArr.map(rr=>{ | ||||
| if (rr.length>16) { | |||||
| if (rr.length>=16) { | |||||
| const carId = isBankCard(rr); | const carId = isBankCard(rr); | ||||
| if (carId) { | if (carId) { | ||||
| that.form.payee = nameArr; | that.form.payee = nameArr; | ||||
| @@ -328,11 +328,41 @@ | |||||
| <p class="main_title" v-if="isModifyOrder" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | <p class="main_title" v-if="isModifyOrder" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | ||||
| <div class="main_box" style="padding: 5px 0 0 0;" v-if="isModifyOrder"> | <div class="main_box" style="padding: 5px 0 0 0;" v-if="isModifyOrder"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="发票" /> | <van-cell title="发票" /> | ||||
| <van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="其他" /> | <van-cell title="其他" /> | ||||
| <van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row v-if="!isModifyOrder"> | <van-row v-if="!isModifyOrder"> | ||||
| @@ -680,6 +710,120 @@ | |||||
| }) | }) | ||||
| }); | }); | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | payeeDictLabel(datas, value) { | ||||
| var actions = []; | var actions = []; | ||||
| Object.keys(datas).some((key) => { | Object.keys(datas).some((key) => { | ||||
| @@ -1187,6 +1331,20 @@ | |||||
| commonAttach(params1).then((r1) => { | commonAttach(params1).then((r1) => { | ||||
| file.id=r1.id; | file.id=r1.id; | ||||
| file.fileUrl = r1.fileUrl; | file.fileUrl = r1.fileUrl; | ||||
| let subIndex = r1.fileUrl.lastIndexOf("."); | |||||
| let ext = r1.fileUrl.substring(subIndex + 1, r1.fileUrl.length); | |||||
| let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL; | |||||
| let fileData = {"url": baseUrl + r1.fileUrl, "file": new File([], "name", {}), "id": r1.id,"type":ext}; | |||||
| if(obj === '1'){ | |||||
| this.fileList1.splice(-1, 1); | |||||
| this.fileList1.push(fileData); | |||||
| }else if(obj === '2'){ | |||||
| this.fileList2.splice(-1, 1); | |||||
| this.fileList2.push(fileData); | |||||
| }else{ | |||||
| this.fileList3.splice(-1, 1); | |||||
| this.fileList3.push(fileData); | |||||
| } | |||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -1203,7 +1361,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -1215,7 +1375,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -1227,7 +1389,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -355,7 +355,7 @@ | |||||
| const data = { | const data = { | ||||
| taskId: this.$route.query.taskId, | taskId: this.$route.query.taskId, | ||||
| auditbatchNo: this.$route.query.auditbatchNo, | auditbatchNo: this.$route.query.auditbatchNo, | ||||
| comment: this.comment, | |||||
| remark: this.comment, | |||||
| pass: this.pass, | pass: this.pass, | ||||
| }; | }; | ||||
| approval(data).then((response) => { | approval(data).then((response) => { | ||||
| @@ -82,13 +82,43 @@ | |||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList1.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="发票" /> | <van-cell value="发票" /> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList2.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="其他" /> | <van-cell value="其他" /> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList3.length" style="margin-left:8px;" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -209,6 +239,120 @@ | |||||
| goFlow(){ | goFlow(){ | ||||
| window.location='approvalProcess?id='+this.$route.query.id+'&auditbatchNo='+this.$route.query.auditbatchNo; | window.location='approvalProcess?id='+this.$route.query.id+'&auditbatchNo='+this.$route.query.auditbatchNo; | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getDictionaries(){ | getDictionaries(){ | ||||
| getTransfer(this.$route.query.id).then((response) => { | getTransfer(this.$route.query.id).then((response) => { | ||||
| this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
| @@ -274,7 +418,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -286,7 +432,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -298,7 +446,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -72,13 +72,43 @@ | |||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList1.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="发票" /> | <van-cell value="发票" /> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList2.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="其他" /> | <van-cell value="其他" /> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList3.length" style="margin-left:8px;" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -253,6 +283,120 @@ | |||||
| } | } | ||||
| }); | }); | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | getFileList(){ | ||||
| let oData1= { | let oData1= { | ||||
| tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
| @@ -263,7 +407,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -275,7 +421,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -287,7 +435,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -27,7 +27,7 @@ | |||||
| finished-text="没有更多了" | finished-text="没有更多了" | ||||
| @load="getList"> | @load="getList"> | ||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | ||||
| <van-cell :title="item.payer" center :to="{name:'sunVillageApprovalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||||
| <van-cell :title="item.remark" center :to="{name:'sunVillageApprovalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../../../static/images/onlineHome/icon_yn1.png" size="30" color="#FF4646" style="margin-right: 10px;" /> | <van-icon name="../../../../../static/images/onlineHome/icon_yn1.png" size="30" color="#FF4646" style="margin-right: 10px;" /> | ||||
| </template> | </template> | ||||
| @@ -35,22 +35,25 @@ | |||||
| <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | ||||
| </template> | </template> | ||||
| <template #default> | <template #default> | ||||
| <p style="width: 80px;display: inline-block">{{item.auditStatus}}</p> | |||||
| <span v-if="item.auditStatus === '0'" style="color: #696969">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else-if="item.auditStatus === '3' " style="color: #00FF00">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else style="color: #FFA500;">{{ selectDictLabel(auditStatusOptions, item.auditStatus) }} </span> | |||||
| </template> | </template> | ||||
| </van-cell> | </van-cell> | ||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| </template> | </template> | ||||
| @@ -106,7 +109,9 @@ export default { | |||||
| listTransfer(this.queryParams).then(response => { | listTransfer(this.queryParams).then(response => { | ||||
| console.log(response) | console.log(response) | ||||
| for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
| response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||||
| if(response.rows[i].remark.length > 12){ | |||||
| response.rows[i].remark = response.rows[i].remark.substring(0,12)+"..."; | |||||
| } | |||||
| this.applicationList.push(response.rows[i]); | this.applicationList.push(response.rows[i]); | ||||
| } | } | ||||
| console.log(this.applicationList.length >= response.total) | console.log(this.applicationList.length >= response.total) | ||||
| @@ -28,10 +28,14 @@ | |||||
| @load="getList" | @load="getList" | ||||
| > | > | ||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | ||||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail11', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||||
| <van-cell :title="item.remark" center :to="{name:'sunVillageApprovalDetail11', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../../../static/images/onlineHome/icon_yn7.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | <van-icon name="../../../../../static/images/onlineHome/icon_yn7.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | ||||
| </template> | </template> | ||||
| <span v-if="item.auditStatus === '0'" style="color: #696969">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else-if="item.auditStatus === '3' " style="color: #00FF00">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else style="color: #FFA500;">{{ selectDictLabel(auditStatusOptions, item.auditStatus) }} </span> | |||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| </template> | </template> | ||||
| @@ -39,16 +43,16 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify11', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify11', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| </template> | </template> | ||||
| @@ -101,7 +105,9 @@ export default { | |||||
| listCash(this.queryParams).then(response => { | listCash(this.queryParams).then(response => { | ||||
| console.log(response) | console.log(response) | ||||
| for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
| response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||||
| if(response.rows[i].remark.length > 12){ | |||||
| response.rows[i].remark = response.rows[i].remark.substring(0,12)+"..."; | |||||
| } | |||||
| this.applicationList.push(response.rows[i]); | this.applicationList.push(response.rows[i]); | ||||
| } | } | ||||
| console.log(this.applicationList.length >= response.total) | console.log(this.applicationList.length >= response.total) | ||||
| @@ -322,11 +322,41 @@ | |||||
| <p class="main_title" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | <p class="main_title" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | ||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="发票" /> | <van-cell title="发票" /> | ||||
| <van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="其他" /> | <van-cell title="其他" /> | ||||
| <van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" @click-preview="previewPreview" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| @@ -810,6 +840,120 @@ | |||||
| this.saveRelease() | this.saveRelease() | ||||
| } | } | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| saveRelease(){ | saveRelease(){ | ||||
| let _this = this; | let _this = this; | ||||
| this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
| @@ -1047,6 +1191,20 @@ | |||||
| commonAttach(params1).then((r1) => { | commonAttach(params1).then((r1) => { | ||||
| file.id=r1.id; | file.id=r1.id; | ||||
| file.fileUrl = r1.fileUrl; | file.fileUrl = r1.fileUrl; | ||||
| let subIndex = r1.fileUrl.lastIndexOf("."); | |||||
| let ext = r1.fileUrl.substring(subIndex + 1, r1.fileUrl.length); | |||||
| let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL; | |||||
| let fileData = {"url": baseUrl + r1.fileUrl, "file": new File([], "name", {}), "id": r1.id,"type":ext}; | |||||
| if(obj === '1'){ | |||||
| this.fileList1.splice(-1, 1); | |||||
| this.fileList1.push(fileData); | |||||
| }else if(obj === '2'){ | |||||
| this.fileList2.splice(-1, 1); | |||||
| this.fileList2.push(fileData); | |||||
| }else{ | |||||
| this.fileList3.splice(-1, 1); | |||||
| this.fileList3.push(fileData); | |||||
| } | |||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -1064,7 +1222,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -1076,7 +1236,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -1088,7 +1250,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -234,11 +234,41 @@ | |||||
| <p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" :after-read="beforeRead1" @click-preview="previewPreview" @delete="deleteFile1" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="发票" /> | <van-cell title="发票" /> | ||||
| <van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" :after-read="beforeRead2" @click-preview="previewPreview" @delete="deleteFile2" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="其他" /> | <van-cell title="其他" /> | ||||
| <van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" :after-read="beforeRead3" @click-preview="previewPreview" @delete="deleteFile3" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| @@ -395,6 +425,120 @@ | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| initProjectInfo(){ | initProjectInfo(){ | ||||
| let _this = this | let _this = this | ||||
| let queryParams={ | let queryParams={ | ||||
| @@ -1807,7 +1951,14 @@ | |||||
| } | } | ||||
| }, | }, | ||||
| beforeRead1(file) { | beforeRead1(file) { | ||||
| this.uploadFiles1.push(file.file); | |||||
| let subIndex = file.file.name.lastIndexOf("."); | |||||
| let ext = file.file.name.substring(subIndex + 1, file.file.name.length); | |||||
| if(ext !== 'png' || ext !== 'jpg'){ | |||||
| this.$set(file, "type", ext); | |||||
| this.fileList1.splice(-1, 1); | |||||
| this.fileList1.push(file); | |||||
| this.uploadFiles1.push(file.file); | |||||
| } | |||||
| }, | }, | ||||
| deleteFile1(file){ | deleteFile1(file){ | ||||
| this.uploadFiles1.map((response,index) => { | this.uploadFiles1.map((response,index) => { | ||||
| @@ -1821,7 +1972,14 @@ | |||||
| } | } | ||||
| }, | }, | ||||
| beforeRead2(file) { | beforeRead2(file) { | ||||
| this.uploadFiles2.push(file.file); | |||||
| let subIndex = file.file.name.lastIndexOf("."); | |||||
| let ext = file.file.name.substring(subIndex + 1, file.file.name.length); | |||||
| if(ext !== 'png' || ext !== 'jpg'){ | |||||
| this.$set(file, "type", ext); | |||||
| this.fileList2.splice(-1, 1); | |||||
| this.fileList2.push(file); | |||||
| this.uploadFiles2.push(file.file); | |||||
| } | |||||
| }, | }, | ||||
| deleteFile2(file){ | deleteFile2(file){ | ||||
| this.uploadFiles2.map((response,index) => { | this.uploadFiles2.map((response,index) => { | ||||
| @@ -1835,7 +1993,14 @@ | |||||
| } | } | ||||
| }, | }, | ||||
| beforeRead3(file) { | beforeRead3(file) { | ||||
| this.uploadFiles3.push(file.file); | |||||
| let subIndex = file.file.name.lastIndexOf("."); | |||||
| let ext = file.file.name.substring(subIndex + 1, file.file.name.length); | |||||
| if(ext !== 'png' || ext !== 'jpg'){ | |||||
| this.$set(file, "type", ext); | |||||
| this.fileList3.splice(-1, 1); | |||||
| this.fileList3.push(file); | |||||
| this.uploadFiles3.push(file.file); | |||||
| } | |||||
| }, | }, | ||||
| deleteFile3(file){ | deleteFile3(file){ | ||||
| this.uploadFiles3.map((response,index) => { | this.uploadFiles3.map((response,index) => { | ||||
| @@ -1858,7 +2023,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -1870,7 +2037,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -1882,7 +2051,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -89,7 +89,8 @@ | |||||
| <div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | <div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | ||||
| <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
| <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
| <a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <!-- <van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX">--> | <!-- <van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX">--> | ||||
| @@ -115,6 +116,12 @@ | |||||
| </div> | </div> | ||||
| </van-form> | </van-form> | ||||
| <van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||||
| <div style="width: 100%;height: 400px;overflow:scroll;"> | |||||
| <img :src="fjImg" width="95%"/> | |||||
| </div> | |||||
| </van-dialog> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -128,6 +135,8 @@ | |||||
| return { | return { | ||||
| showBuildTime:false, | showBuildTime:false, | ||||
| showPictureType:false, | showPictureType:false, | ||||
| fjImg:"", | |||||
| fjImgShow:false, | |||||
| form:{ | form:{ | ||||
| openAt:this.format(new Date(),'yyyy-MM-dd'), | openAt:this.format(new Date(),'yyyy-MM-dd'), | ||||
| openPic:'', | openPic:'', | ||||
| @@ -203,6 +212,26 @@ | |||||
| that.form = res.data; | that.form = res.data; | ||||
| }) | }) | ||||
| }, | }, | ||||
| goToPage(url) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| let subIndex = url.lastIndexOf("."); | |||||
| let ext = url.substring(subIndex + 1, url.length); | |||||
| //console.log(ext) | |||||
| if (ext == "jpg" || ext == "png") { | |||||
| url = url.substring(4,url.length); | |||||
| this.fjImg = baseImgUrl + url; | |||||
| this.fjImgShow = true; | |||||
| }else{ | |||||
| let allUrl = url; | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| }, | |||||
| onSubmit(){ | onSubmit(){ | ||||
| var that = this; | var that = this; | ||||
| that.form.openFile = that.openFile2.join(',') | that.form.openFile = that.openFile2.join(',') | ||||
| @@ -54,7 +54,8 @@ | |||||
| <div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | <div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | ||||
| <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
| <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
| <a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -66,7 +67,11 @@ | |||||
| </van-field> | </van-field> | ||||
| </div> | </div> | ||||
| <van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||||
| <div style="width: 100%;height: 400px;overflow:scroll;"> | |||||
| <img :src="fjImg" width="95%"/> | |||||
| </div> | |||||
| </van-dialog> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -87,6 +92,8 @@ | |||||
| openPic:[], | openPic:[], | ||||
| fileList:[], | fileList:[], | ||||
| fileList1:[], | fileList1:[], | ||||
| fjImgShow:false, | |||||
| fjImg:'', | |||||
| openNy:new Date(), | openNy:new Date(), | ||||
| type:'', | type:'', | ||||
| openFile:[], | openFile:[], | ||||
| @@ -141,6 +148,26 @@ | |||||
| this.form = res.data; | this.form = res.data; | ||||
| }) | }) | ||||
| }, | }, | ||||
| goToPage(url) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| let subIndex = url.lastIndexOf("."); | |||||
| let ext = url.substring(subIndex + 1, url.length); | |||||
| //console.log(ext) | |||||
| if (ext == "jpg" || ext == "png") { | |||||
| url = url.substring(4,url.length); | |||||
| this.fjImg = baseImgUrl + url; | |||||
| this.fjImgShow = true; | |||||
| }else{ | |||||
| let allUrl = url; | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| }, | |||||
| }, | }, | ||||
| } | } | ||||
| @@ -86,7 +86,8 @@ | |||||
| <div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | <div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | ||||
| <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
| <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
| <a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <!-- <van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX">--> | <!-- <van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX">--> | ||||
| @@ -102,6 +103,11 @@ | |||||
| </div> | </div> | ||||
| </van-form> | </van-form> | ||||
| <van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||||
| <div style="width: 100%;height: 400px;overflow:scroll;"> | |||||
| <img :src="fjImg" width="95%"/> | |||||
| </div> | |||||
| </van-dialog> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -120,6 +126,8 @@ | |||||
| openPic:'', | openPic:'', | ||||
| openFile:'', | openFile:'', | ||||
| }, | }, | ||||
| fjImg:'', | |||||
| fjImgShow:false, | |||||
| openPic:[], | openPic:[], | ||||
| pictureTypeOptions:[], | pictureTypeOptions:[], | ||||
| fileList:[], | fileList:[], | ||||
| @@ -165,7 +173,7 @@ | |||||
| }else if(name.indexOf('.xls') > -1){ | }else if(name.indexOf('.xls') > -1){ | ||||
| type = 'excel'; | type = 'excel'; | ||||
| } | } | ||||
| this.openFile[i] = {name:name,type:type} | |||||
| this.openFile[i] = {name:name,type:type,url:'/api'+rr} | |||||
| }) | }) | ||||
| } | } | ||||
| if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ | if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ | ||||
| @@ -192,6 +200,26 @@ | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| goToPage(url) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| let subIndex = url.lastIndexOf("."); | |||||
| let ext = url.substring(subIndex + 1, url.length); | |||||
| //console.log(ext) | |||||
| if (ext == "jpg" || ext == "png") { | |||||
| url = url.substring(4,url.length); | |||||
| this.fjImg = baseImgUrl + url; | |||||
| this.fjImgShow = true; | |||||
| }else{ | |||||
| let allUrl = url; | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| }, | |||||
| onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
| this.form.openAt = this.format(data,'yyyy-MM-dd'); | this.form.openAt = this.format(data,'yyyy-MM-dd'); | ||||
| this.openNy = data; | this.openNy = data; | ||||
| @@ -54,7 +54,8 @@ | |||||
| <div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | <div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | ||||
| <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
| <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
| <a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
| <p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -66,7 +67,11 @@ | |||||
| </van-field> | </van-field> | ||||
| </div> | </div> | ||||
| <van-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||||
| <div style="width: 100%;height: 400px;overflow:scroll;"> | |||||
| <img :src="fjImg" width="95%"/> | |||||
| </div> | |||||
| </van-dialog> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -84,6 +89,8 @@ | |||||
| openPic:'', | openPic:'', | ||||
| openFile:'', | openFile:'', | ||||
| }, | }, | ||||
| fjImg:'', | |||||
| fjImgShow:false, | |||||
| openPic:[], | openPic:[], | ||||
| fileList:[], | fileList:[], | ||||
| fileList1:[], | fileList1:[], | ||||
| @@ -141,7 +148,26 @@ | |||||
| this.form = res.data; | this.form = res.data; | ||||
| }) | }) | ||||
| }, | }, | ||||
| goToPage(url) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| let subIndex = url.lastIndexOf("."); | |||||
| let ext = url.substring(subIndex + 1, url.length); | |||||
| //console.log(ext) | |||||
| if (ext == "jpg" || ext == "png") { | |||||
| url = url.substring(4,url.length); | |||||
| this.fjImg = baseImgUrl + url; | |||||
| this.fjImgShow = true; | |||||
| }else{ | |||||
| let allUrl = url; | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| }, | |||||
| }, | }, | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -29,8 +29,8 @@ | |||||
| <van-row> | <van-row> | ||||
| <van-col :span="24">姓名</van-col> | <van-col :span="24">姓名</van-col> | ||||
| </van-row> | </van-row> | ||||
| <van-row v-for="(item,index) in 10" :key="index"> | |||||
| <van-col :span="24">张三</van-col> | |||||
| <van-row v-for="(item,index) in oddjobList" :key="index"> | |||||
| <van-col :span="24">{{item.workerName}}</van-col> | |||||
| </van-row> | </van-row> | ||||
| <div class="name_bg"></div> | <div class="name_bg"></div> | ||||
| <img src="../../assets/images/sunVillage_info/name_icon.png" class="name_icon"/> | <img src="../../assets/images/sunVillage_info/name_icon.png" class="name_icon"/> | ||||
| @@ -43,10 +43,10 @@ | |||||
| <van-col :span="8">出工事由</van-col> | <van-col :span="8">出工事由</van-col> | ||||
| <van-col :span="8">出工数</van-col> | <van-col :span="8">出工数</van-col> | ||||
| </van-row> | </van-row> | ||||
| <van-row v-for="(item,index) in 10" :key="index"> | |||||
| <van-col :span="8">2023-03-05</van-col> | |||||
| <van-col :span="8">上班打卡</van-col> | |||||
| <van-col :span="8">8</van-col> | |||||
| <van-row v-for="(item,index) in oddjobList" :key="index"> | |||||
| <van-col :span="8">{{item.jobTime}}</van-col> | |||||
| <van-col :span="8">{{item.workReason}}</van-col> | |||||
| <van-col :span="8">{{item.workNum}}</van-col> | |||||
| </van-row> | </van-row> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -77,6 +77,7 @@ | |||||
| fileList:[], | fileList:[], | ||||
| listLength:'0', | listLength:'0', | ||||
| searchInput:'', | searchInput:'', | ||||
| pageNum:0, | |||||
| queryParams:{ | queryParams:{ | ||||
| pageNum:1, | pageNum:1, | ||||
| pageSize:10, | pageSize:10, | ||||
| @@ -92,6 +93,7 @@ | |||||
| showBtn:true, | showBtn:true, | ||||
| yearMonth:[], | yearMonth:[], | ||||
| yearList:[], | yearList:[], | ||||
| oddjobList:[], | |||||
| deptName:'', | deptName:'', | ||||
| nowYear:new Date().getFullYear(), | nowYear:new Date().getFullYear(), | ||||
| }; | }; | ||||
| @@ -109,7 +111,14 @@ | |||||
| methods: { | methods: { | ||||
| getList(){ | getList(){ | ||||
| var _this = this; | var _this = this; | ||||
| let params = { | |||||
| bookId:this.queryParams.bookId, | |||||
| yearMonth:this.queryParams.yearMonth, | |||||
| } | |||||
| listOddjob(params).then(response => { | |||||
| this.listLength = response.total; | |||||
| this.oddjobList = response.rows; | |||||
| }); | |||||
| }, | }, | ||||
| tabClickMonth(month){ | tabClickMonth(month){ | ||||
| this.month = month ; | this.month = month ; | ||||
| @@ -4,7 +4,7 @@ | |||||
| 零工登记 | 零工登记 | ||||
| <div class="return_btn" @click="onClickLeft"></div> | <div class="return_btn" @click="onClickLeft"></div> | ||||
| </div> | </div> | ||||
| <van-form > | |||||
| <van-form ref="formData"> | |||||
| <div class="list_main"> | <div class="list_main"> | ||||
| <div class="titBox"> | <div class="titBox"> | ||||
| <img src="../../assets/images/sunVillage_info/add_icon_3.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | <img src="../../assets/images/sunVillage_info/add_icon_3.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | ||||
| @@ -16,7 +16,7 @@ | |||||
| clickable | clickable | ||||
| label="出工日期" | label="出工日期" | ||||
| placeholder="请选择" | placeholder="请选择" | ||||
| v-model="value" | |||||
| v-model="form.jobTime" | |||||
| @click="showBuildTime = true" | @click="showBuildTime = true" | ||||
| input-align="right" | input-align="right" | ||||
| right-icon="arrow-down" | right-icon="arrow-down" | ||||
| @@ -30,24 +30,25 @@ | |||||
| type="date" | type="date" | ||||
| title="选择年月日" | title="选择年月日" | ||||
| :min-date="minDate" | :min-date="minDate" | ||||
| v-model="buildTime" | |||||
| :max-date="maxDate" | |||||
| :value="new Date" | |||||
| @confirm="onConfirmBuildTime" | @confirm="onConfirmBuildTime" | ||||
| @cancel="showBuildTime = false" | @cancel="showBuildTime = false" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field required :rules="[{ required: true, message: '请填写出工姓名' }]" v-model="value" label="出工姓名" placeholder="出工姓名" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写出工事由' }]" v-model="value" label="出工事由" placeholder="出工事由" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写记工员' }]" v-model="value" label="记工员" placeholder="记工员" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="value" label="出工数" placeholder="出工数" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="value" label="工日值" placeholder="工日值" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写金额(元)' }]" v-model="value" label="金额(元)" placeholder="金额(元)" input-align="right" :border="false" /> | |||||
| <van-field v-model="value" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写出工姓名' }]" v-model="form.workerName" label="出工姓名" placeholder="出工姓名" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写出工事由' }]" v-model="form.workReason" label="出工事由" placeholder="出工事由" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写记工员' }]" v-model="form.workerNote" label="记工员" placeholder="记工员" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="form.workNum" label="出工数" placeholder="出工数" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="form.perMoney" label="工日值" placeholder="工日值" input-align="right" :border="false" /> | |||||
| <van-field required :rules="[{ required: true, message: '请填写金额(元)' }]" v-model="form.totalMoney" label="金额(元)" placeholder="金额(元)" input-align="right" :border="false" /> | |||||
| <van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
| </div> | </div> | ||||
| <div style="margin: 16px auto;width: 50%;"> | <div style="margin: 16px auto;width: 50%;"> | ||||
| <van-button round block type="primary" native-type="submit"> | |||||
| <van-button round block type="primary" @click="submitForm"> | |||||
| 保存 | 保存 | ||||
| </van-button> | </van-button> | ||||
| </div> | </div> | ||||
| @@ -55,15 +56,16 @@ | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import { addPermanent } from "@/api/sunVillage_info/fixedAssets"; | |||||
| import { addOddjob,updateOddjob } from "@/api/sunVillage_info/fixedAssets"; | |||||
| export default { | export default { | ||||
| name: "certificateList", | name: "certificateList", | ||||
| data() { | data() { | ||||
| return { | return { | ||||
| minDate:new Date(1900,1,1), | minDate:new Date(1900,1,1), | ||||
| maxDate: new Date(2050, 12, 31), | |||||
| showBuildTime:false, | showBuildTime:false, | ||||
| form:{}, | |||||
| buildTime:new Date(), | buildTime:new Date(), | ||||
| value:'' | value:'' | ||||
| @@ -74,9 +76,42 @@ | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| onConfirmBuildTime(data){ | onConfirmBuildTime(data){ | ||||
| this.form.buildTime = this.format(data,'yyyy-MM-dd'); | |||||
| this.form.jobTime = this.format(data,'yyyy-MM-dd'); | |||||
| this.showBuildTime = false; | this.showBuildTime = false; | ||||
| }, | }, | ||||
| submitForm(){ | |||||
| this.$refs.formData.validate().then(() => { | |||||
| if (this.form.id) { | |||||
| updateOddjob(this.form).then(response => { | |||||
| if (response.code == 200) { | |||||
| this.$toast({ | |||||
| icon: 'success', | |||||
| message: '保存成功', | |||||
| duration:"1000", | |||||
| }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }); | |||||
| } else { | |||||
| addOddjob(this.form).then(response => { | |||||
| if (response.code == 200) { | |||||
| this.$toast({ | |||||
| icon: 'success', | |||||
| message: '保存成功', | |||||
| duration:"1000", | |||||
| }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }); | |||||
| } | |||||
| }).catch(() => { | |||||
| this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | |||||
| }); | |||||
| }, | |||||
| }, | }, | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -180,12 +180,13 @@ | |||||
| var that = this; | var that = this; | ||||
| var str = val; | var str = val; | ||||
| var numArr = str.match(/\d+/g) | var numArr = str.match(/\d+/g) | ||||
| var nameArr = str.match(/[\u4e00-\u9fa5]/g).join("") | |||||
| console.log(numArr) | |||||
| console.log(nameArr) | |||||
| var nameArr = str.match(/[\u4e00-\u9fa5]/g) | |||||
| if(nameArr != null){ | |||||
| nameArr = nameArr.join("") | |||||
| } | |||||
| if (numArr) { | if (numArr) { | ||||
| numArr.map(rr=>{ | numArr.map(rr=>{ | ||||
| if (rr.length>16) { | |||||
| if (rr.length>=16) { | |||||
| const carId = isBankCard(rr); | const carId = isBankCard(rr); | ||||
| if (carId) { | if (carId) { | ||||
| that.form.payee = nameArr; | that.form.payee = nameArr; | ||||
| @@ -275,7 +275,7 @@ | |||||
| </van-cell> | </van-cell> | ||||
| </div> | </div> | ||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | ||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | <div class="main_box" style="margin-bottom: 10px;position:relative;"> | ||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| @@ -323,11 +323,41 @@ | |||||
| <p class="main_title" v-if="isModifyOrder" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | <p class="main_title" v-if="isModifyOrder" style="margin: 0.2rem 3%;">上传附件<i style="margin-right: 0.5em;"></i><span style="font-size: 12px;color: red;">(若申请单未变动可不必点击底部的修改按钮)</span></p> | ||||
| <div class="main_box" style="padding: 5px 0 0 0;" v-if="isModifyOrder"> | <div class="main_box" style="padding: 5px 0 0 0;" v-if="isModifyOrder"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" :after-read="beforeRead('1')" @click-preview="previewPreview" @delete="deleteFile" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="发票" /> | <van-cell title="发票" /> | ||||
| <van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" :after-read="beforeRead('2')" @click-preview="previewPreview" @delete="deleteFile" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell title="其他" /> | <van-cell title="其他" /> | ||||
| <van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" :after-read="beforeRead('3')" @click-preview="previewPreview" @delete="deleteFile" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row v-if="!isModifyOrder"> | <van-row v-if="!isModifyOrder"> | ||||
| @@ -538,6 +568,120 @@ | |||||
| let dd = new Date().getDate(); | let dd = new Date().getDate(); | ||||
| _this.nowDate = moment(new Date()).format("YYYY-MM-DD"); | _this.nowDate = moment(new Date()).format("YYYY-MM-DD"); | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| initProjectInfo(){ | initProjectInfo(){ | ||||
| let _this = this | let _this = this | ||||
| let queryParams={ | let queryParams={ | ||||
| @@ -1168,6 +1312,20 @@ | |||||
| commonAttach(params1).then((r1) => { | commonAttach(params1).then((r1) => { | ||||
| file.id=r1.id; | file.id=r1.id; | ||||
| file.fileUrl = r1.fileUrl; | file.fileUrl = r1.fileUrl; | ||||
| let subIndex = r1.fileUrl.lastIndexOf("."); | |||||
| let ext = r1.fileUrl.substring(subIndex + 1, r1.fileUrl.length); | |||||
| let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL; | |||||
| let fileData = {"url": baseUrl + r1.fileUrl, "file": new File([], "name", {}), "id": r1.id,"type":ext}; | |||||
| if(obj === '1'){ | |||||
| this.fileList1.splice(-1, 1); | |||||
| this.fileList1.push(fileData); | |||||
| }else if(obj === '2'){ | |||||
| this.fileList2.splice(-1, 1); | |||||
| this.fileList2.push(fileData); | |||||
| }else{ | |||||
| this.fileList3.splice(-1, 1); | |||||
| this.fileList3.push(fileData); | |||||
| } | |||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -1184,7 +1342,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -1196,7 +1356,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -1208,7 +1370,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -232,11 +232,11 @@ | |||||
| <p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" @click-preview="previewPreview" style="margin-left:8px;"></van-uploader> | |||||
| <van-cell title="发票" /> | <van-cell title="发票" /> | ||||
| <van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" @click-preview="previewPreview" style="margin-left:8px;"></van-uploader> | |||||
| <van-cell title="其他" /> | <van-cell title="其他" /> | ||||
| <van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" @click-preview="previewPreview" style="margin-left:8px;"></van-uploader> | |||||
| </div> | </div> | ||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| @@ -445,6 +445,120 @@ | |||||
| } | } | ||||
| }); | }); | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| // 表单重置 | // 表单重置 | ||||
| reset() { | reset() { | ||||
| this.form = { | this.form = { | ||||
| @@ -700,6 +814,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -710,6 +825,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -718,6 +834,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -776,6 +893,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -792,6 +910,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -807,6 +926,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -828,6 +948,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -844,6 +965,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -859,6 +981,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -889,6 +1012,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -905,6 +1029,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -920,6 +1045,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -940,6 +1066,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -956,6 +1083,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -971,6 +1099,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1011,6 +1140,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1027,6 +1157,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1043,6 +1174,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1063,6 +1195,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1079,6 +1212,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1094,6 +1228,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1124,6 +1259,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1140,6 +1276,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1155,6 +1292,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1175,6 +1313,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1191,6 +1330,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1206,6 +1346,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1308,6 +1449,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1322,6 +1464,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1335,6 +1478,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1353,6 +1497,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1367,6 +1512,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1380,6 +1526,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1408,6 +1555,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1422,6 +1570,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1435,6 +1584,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1453,6 +1603,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1467,6 +1618,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1480,6 +1632,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1518,6 +1671,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1532,6 +1686,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1545,6 +1700,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1563,6 +1719,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1577,6 +1734,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1590,6 +1748,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1618,6 +1777,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1632,6 +1792,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1645,6 +1806,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1663,6 +1825,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1677,6 +1840,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1690,6 +1854,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -1857,7 +2022,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -1869,7 +2036,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -1881,7 +2050,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -782,6 +782,8 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -789,6 +791,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -801,6 +804,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -808,6 +812,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -818,6 +823,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -825,6 +831,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -880,6 +887,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -887,6 +895,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -898,6 +907,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -905,6 +915,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -915,6 +926,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -922,6 +934,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -937,6 +950,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -944,6 +958,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -955,6 +970,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -962,6 +978,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -972,6 +989,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -979,6 +997,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1004,6 +1023,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1011,6 +1031,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1022,6 +1043,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1029,6 +1051,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1039,6 +1062,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1046,6 +1070,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1061,6 +1086,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1068,6 +1094,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1079,6 +1106,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1086,6 +1114,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1096,6 +1125,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1103,6 +1133,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1138,6 +1169,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1145,6 +1177,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1156,6 +1189,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1163,6 +1197,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1173,6 +1208,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1180,6 +1216,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1195,6 +1232,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1202,6 +1240,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1213,6 +1252,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1220,6 +1260,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1230,6 +1271,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1237,6 +1279,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1262,6 +1305,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1269,6 +1313,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1280,6 +1325,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1287,6 +1333,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1297,6 +1344,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1304,6 +1352,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1319,6 +1368,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1326,6 +1376,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1337,6 +1388,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1344,6 +1396,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1354,6 +1407,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| @@ -1361,6 +1415,7 @@ | |||||
| _this.$toast.success('提交成功'); | _this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -1446,6 +1501,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(_this.form.capitalExpenditureType==4){ | } else if(_this.form.capitalExpenditureType==4){ | ||||
| @@ -1453,12 +1509,14 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -1470,6 +1528,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(_this.form.capitalExpenditureType==4){ | } else if(_this.form.capitalExpenditureType==4){ | ||||
| @@ -1477,12 +1536,14 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -1504,6 +1565,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(_this.form.capitalExpenditureType==4){ | } else if(_this.form.capitalExpenditureType==4){ | ||||
| @@ -1511,12 +1573,14 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -1528,6 +1592,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(_this.form.capitalExpenditureType==4){ | } else if(_this.form.capitalExpenditureType==4){ | ||||
| @@ -1535,12 +1600,14 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -1572,6 +1639,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(_this.form.capitalExpenditureType==4){ | } else if(_this.form.capitalExpenditureType==4){ | ||||
| @@ -1579,12 +1647,14 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -1596,6 +1666,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(_this.form.capitalExpenditureType==4){ | } else if(_this.form.capitalExpenditureType==4){ | ||||
| @@ -1603,12 +1674,14 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -1630,6 +1703,7 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(_this.form.capitalExpenditureType==4){ | } else if(_this.form.capitalExpenditureType==4){ | ||||
| @@ -1637,12 +1711,14 @@ | |||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| _this.$toast.success('保存成功'); | _this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -1654,6 +1730,7 @@ | |||||
| this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } else if(this.form.capitalExpenditureType==4){ | } else if(this.form.capitalExpenditureType==4){ | ||||
| @@ -1661,12 +1738,14 @@ | |||||
| this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -78,7 +78,17 @@ | |||||
| <p class="main_title">上传附件(收据)</p> | <p class="main_title">上传附件(收据)</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | <p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | ||||
| <van-cell v-for="(item,index) in fileList1" :key="index"> | <van-cell v-for="(item,index) in fileList1" :key="index"> | ||||
| @@ -87,7 +97,17 @@ | |||||
| <p class="main_title">上传附件(发票)</p> | <p class="main_title">上传附件(发票)</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | <p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | ||||
| <van-cell v-for="(item,index) in fileList2" :key="index"> | <van-cell v-for="(item,index) in fileList2" :key="index"> | ||||
| @@ -96,7 +116,17 @@ | |||||
| <p class="main_title">上传附件(其他)</p> | <p class="main_title">上传附件(其他)</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | <p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | ||||
| <van-cell v-for="(item,index) in fileList3" :key="index"> | <van-cell v-for="(item,index) in fileList3" :key="index"> | ||||
| @@ -332,7 +362,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -344,7 +376,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -356,7 +390,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -366,7 +402,7 @@ | |||||
| const data = { | const data = { | ||||
| taskId: this.$route.query.taskId, | taskId: this.$route.query.taskId, | ||||
| auditbatchNo: this.$route.query.auditbatchNo, | auditbatchNo: this.$route.query.auditbatchNo, | ||||
| comment: this.comment, | |||||
| remark: this.comment, | |||||
| pass: this.pass, | pass: this.pass, | ||||
| }; | }; | ||||
| approval(data).then((response) => { | approval(data).then((response) => { | ||||
| @@ -68,7 +68,17 @@ | |||||
| <p class="main_title">上传附件(收据)</p> | <p class="main_title">上传附件(收据)</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | <p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | ||||
| <van-cell v-for="(item,index) in fileList1" :key="index"> | <van-cell v-for="(item,index) in fileList1" :key="index"> | ||||
| @@ -77,7 +87,17 @@ | |||||
| <p class="main_title">上传附件(发票)</p> | <p class="main_title">上传附件(发票)</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | <p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | ||||
| <van-cell v-for="(item,index) in fileList2" :key="index"> | <van-cell v-for="(item,index) in fileList2" :key="index"> | ||||
| @@ -86,7 +106,17 @@ | |||||
| <p class="main_title">上传附件(其他)</p> | <p class="main_title">上传附件(其他)</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| <p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | <p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | ||||
| <van-cell v-for="(item,index) in fileList3" :key="index"> | <van-cell v-for="(item,index) in fileList3" :key="index"> | ||||
| @@ -315,7 +345,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -327,7 +359,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -339,7 +373,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -355,7 +391,7 @@ | |||||
| const data = { | const data = { | ||||
| taskId: this.$route.query.taskId, | taskId: this.$route.query.taskId, | ||||
| auditbatchNo: this.$route.query.auditbatchNo, | auditbatchNo: this.$route.query.auditbatchNo, | ||||
| comment: this.comment, | |||||
| remark: this.comment, | |||||
| pass: this.pass, | pass: this.pass, | ||||
| }; | }; | ||||
| console.log(data); | console.log(data); | ||||
| @@ -15,8 +15,8 @@ | |||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <p class="main_title">基础信息</p> | <p class="main_title">基础信息</p> | ||||
| <div class="main_box"> | <div class="main_box"> | ||||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right"/> | |||||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | ||||
| <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | ||||
| <template #input> | <template #input> | ||||
| @@ -26,15 +26,18 @@ | |||||
| </van-radio-group> | </van-radio-group> | ||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||||
| <van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" | |||||
| input-align="right" label-width="auto"/> | |||||
| </div> | </div> | ||||
| <div class="main_box" style="margin-top: 10px;"> | <div class="main_box" style="margin-top: 10px;"> | ||||
| <van-field readonly label="转账附言" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| <van-field readonly label="转账附言" v-model="form.remark" type="textarea" input-align="right" rows="3" | |||||
| label-width="auto"/> | |||||
| </div> | </div> | ||||
| <div class="main_box" style="margin-top: 10px;"> | <div class="main_box" style="margin-top: 10px;"> | ||||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" | |||||
| label-width="auto"/> | |||||
| </div> | </div> | ||||
| <p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
| @@ -44,14 +47,14 @@ | |||||
| </div> | </div> | ||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | ||||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right"/> | |||||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | ||||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | ||||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right"/> | |||||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
| </div> | </div> | ||||
| <div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | <div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | ||||
| <van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||||
| <van-field readonly label="合同名称" v-model="infoForm.name" input-align="right"/> | |||||
| <van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | <van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | ||||
| <van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | <van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | ||||
| </div> | </div> | ||||
| @@ -59,116 +62,170 @@ | |||||
| <p class="main_title">收款方信息</p> | <p class="main_title">收款方信息</p> | ||||
| <div class="main_box" style="margin-bottom: 15px;"> | <div class="main_box" style="margin-bottom: 15px;"> | ||||
| <van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="行内转账" v-if="form.bankType==2||form.bankType==3||form.bankType==4" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" | |||||
| input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="行内转账" v-if="form.bankType==2||form.bankType==3||form.bankType==4" | |||||
| v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto"/> | |||||
| </div> | </div> | ||||
| <div style="position:relative;" > | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> | |||||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||||
| <div style="position:relative;"> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" | |||||
| :key="index" v-if="index<listLength"> | |||||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right"/> | |||||
| <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | ||||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | ||||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | ||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||||
| <van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="转账状态" v-model="item.transferStatus" input-align="right" /> | |||||
| <van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="交易结果描述" v-model="item.causeFailure" type="textarea" input-align="right" rows="3" label-width="auto" /> | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right"/> | |||||
| <van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="转账状态" | |||||
| v-model="item.transferStatus" input-align="right"/> | |||||
| <van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="交易结果描述" | |||||
| v-model="item.causeFailure" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | </div> | ||||
| <p class="main_more" v-if="chargeItme.length>1 && showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> | |||||
| <p class="main_more" v-if="chargeItme.length>1 && showbtn" @click="listLength = chargeItme.length,showbtn=false"> | |||||
| 查看更多</p> | |||||
| <p class="main_more" v-if="chargeItme.length>1 && !showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | <p class="main_more" v-if="chargeItme.length>1 && !showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-cell value="发票" /> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-cell value="其他" /> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||||
| <van-cell value="收据"/> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled | |||||
| :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" @click-preview="previewPreview" | |||||
| :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="发票"/> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled | |||||
| :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" @click-preview="previewPreview" | |||||
| :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="其他"/> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled | |||||
| :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" @click-preview="previewPreview" | |||||
| :deletable="false" :max-count="fileList3.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import { | |||||
| getTransfer, | |||||
| queryTransferDetail, | |||||
| listPayee, | |||||
| updateTransfer, | |||||
| getProjectto, | |||||
| listProject, | |||||
| addProjectto, | |||||
| customSubmit, | |||||
| getInfoto, | |||||
| listTemplate | |||||
| } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | import request from '@/utils/request' | ||||
| import { | import { | ||||
| attachmentList, | attachmentList, | ||||
| commonAttach, | commonAttach, | ||||
| systemAttachment | systemAttachment | ||||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| export default { | export default { | ||||
| name: "approvalDetail", | name: "approvalDetail", | ||||
| data() { | data() { | ||||
| return { | return { | ||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showbtn:true, | |||||
| showcapital: false, | |||||
| showpayee: false, | |||||
| showlasj: false, | |||||
| showbankType: false, | |||||
| showproject: false, | |||||
| showFundType: false, | |||||
| showbtn: true, | |||||
| listLength:1, | |||||
| listLength: 1, | |||||
| minDate: new Date(), | minDate: new Date(), | ||||
| maxDate: new Date(2025, 10, 1), | maxDate: new Date(2025, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | |||||
| fileList1:[], | |||||
| fileList2:[], | |||||
| fileList3:[], | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| form: {}, | |||||
| fileList1: [], | |||||
| fileList2: [], | |||||
| fileList3: [], | |||||
| capitalExpenditureType: '', | |||||
| payee: '', | |||||
| bankType: '', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| transferStatusOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectList:[], | |||||
| wfydlxDictionaries: [], | |||||
| jglxDictionaries: [], | |||||
| sysDictionaries: [], | |||||
| capitalExpenditureTypeOptions: [], | |||||
| bankTypeDictionaries: [], | |||||
| projectList: [], | |||||
| projectFundTypeOptions: [], | |||||
| transferStatusOptions: [], | |||||
| projectFundTypeDictionaries: [], | |||||
| projectList: [], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| chargeItme: [], | |||||
| chargeItmeShow: [], | |||||
| payeeList:[], | |||||
| payeeList: [], | |||||
| // 查询参数 | // 查询参数 | ||||
| queryParams: { | queryParams: { | ||||
| transferType:"", | |||||
| transferType: "", | |||||
| orderByColumn: "id", | orderByColumn: "id", | ||||
| isAsc: "desc", | isAsc: "desc", | ||||
| }, | }, | ||||
| capitalExpenditureOpen:false, | |||||
| contractOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| capitalExpenditureOpen: false, | |||||
| contractOpen: false, | |||||
| projectForm: { | |||||
| projectId: null, | |||||
| projectName: null, | |||||
| projectContractor: null, | |||||
| projectAmount: null, | |||||
| projectBillNum: null, | |||||
| projectFundType: '1', | |||||
| outId: null, | |||||
| ynType: '1' | |||||
| }, | }, | ||||
| infoForm:{ | |||||
| infoId:null, | |||||
| name:null, | |||||
| code:null, | |||||
| totalAmount:null, | |||||
| contractionId:null, | |||||
| transferId:null | |||||
| infoForm: { | |||||
| infoId: null, | |||||
| name: null, | |||||
| code: null, | |||||
| totalAmount: null, | |||||
| contractionId: null, | |||||
| transferId: null | |||||
| }, | }, | ||||
| projectFundType:'', | |||||
| templateList:[], | |||||
| projectFundType: '', | |||||
| templateList: [], | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -189,7 +246,7 @@ | |||||
| this.getTemplateList(); | this.getTemplateList(); | ||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| getTemplateList(){ | |||||
| getTemplateList() { | |||||
| let templateQueryParams = { | let templateQueryParams = { | ||||
| // 分页 | // 分页 | ||||
| pageNum: 1, | pageNum: 1, | ||||
| @@ -199,20 +256,20 @@ | |||||
| this.templateList = response.rows; | this.templateList = response.rows; | ||||
| }); | }); | ||||
| }, | }, | ||||
| tempalteFormat(id){ | |||||
| tempalteFormat(id) { | |||||
| let name = "" | let name = "" | ||||
| this.templateList.map(res => { | this.templateList.map(res => { | ||||
| if(res.id==id){ | |||||
| if (res.id == id) { | |||||
| console.log(res.name) | console.log(res.name) | ||||
| name = res.name | |||||
| name = res.name | |||||
| } | } | ||||
| }) | }) | ||||
| return name | return name | ||||
| }, | }, | ||||
| goFlow(){ | |||||
| window.location='approvalProcess?id='+this.$route.query.id+'&auditbatchNo='+this.$route.query.auditbatchNo; | |||||
| goFlow() { | |||||
| window.location = 'approvalProcess?id=' + this.$route.query.id + '&auditbatchNo=' + this.$route.query.auditbatchNo; | |||||
| }, | }, | ||||
| getDictionaries(){ | |||||
| getDictionaries() { | |||||
| getTransfer(this.$route.query.id).then((response) => { | getTransfer(this.$route.query.id).then((response) => { | ||||
| this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
| for (var i = 0; i < res.data.length; i++) { | for (var i = 0; i < res.data.length; i++) { | ||||
| @@ -220,17 +277,17 @@ | |||||
| } | } | ||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | ||||
| }); | }); | ||||
| if(response.data.capitalExpenditureType==2){ | |||||
| if (response.data.capitalExpenditureType == 2) { | |||||
| this.capitalExpenditureOpen = true | this.capitalExpenditureOpen = true | ||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| let param = { | |||||
| 'outId': response.data.id, | |||||
| 'ynType': '1' | |||||
| } | } | ||||
| getProjectto(param).then(res => { | getProjectto(param).then(res => { | ||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
| this.projectForm = res.data | this.projectForm = res.data | ||||
| }) | }) | ||||
| }else if(response.data.capitalExpenditureType==4) { | |||||
| } else if (response.data.capitalExpenditureType == 4) { | |||||
| this.contractOpen = true | this.contractOpen = true | ||||
| let param = { | let param = { | ||||
| 'transferId': response.data.id | 'transferId': response.data.id | ||||
| @@ -238,13 +295,13 @@ | |||||
| getInfoto(param).then(res => { | getInfoto(param).then(res => { | ||||
| this.infoForm = res.data | this.infoForm = res.data | ||||
| }) | }) | ||||
| }else{ | |||||
| } else { | |||||
| this.showproject = false | this.showproject = false | ||||
| } | } | ||||
| this.form = response.data; | this.form = response.data; | ||||
| }); | }); | ||||
| queryTransferDetail(this.$route.query.id).then((response) => { | queryTransferDetail(this.$route.query.id).then((response) => { | ||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| for (var j = 0; j < response.rows.length; j++) { | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(this.bankTypeDictionaries, response.rows[j].bankType); | response.rows[j].bankTypeText = this.selectDictLabel(this.bankTypeDictionaries, response.rows[j].bankType); | ||||
| response.rows[j].transferStatus = this.selectDictLabel(this.transferStatusOptions, response.rows[j].transferStatus); | response.rows[j].transferStatus = this.selectDictLabel(this.transferStatusOptions, response.rows[j].transferStatus); | ||||
| } | } | ||||
| @@ -252,6 +309,120 @@ | |||||
| this.getPayeeList(); | this.getPayeeList(); | ||||
| }); | }); | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file, fileType) { | |||||
| return new Promise((resolve, reject) => { | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload = function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,' + base64String); | |||||
| } | |||||
| reader.onerror = function () { | |||||
| reject(new Error("Failed to load file")) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getPayeeList() { | getPayeeList() { | ||||
| //普通转账 | //普通转账 | ||||
| this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
| @@ -262,8 +433,8 @@ | |||||
| } | } | ||||
| }); | }); | ||||
| }, | }, | ||||
| getFileList(){ | |||||
| let oData1= { | |||||
| getFileList() { | |||||
| let oData1 = { | |||||
| tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
| tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
| bizPath: "transfer", | bizPath: "transfer", | ||||
| @@ -271,11 +442,13 @@ | |||||
| } | } | ||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | |||||
| let oData2 = { | |||||
| tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
| tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
| bizPath: "transfer", | bizPath: "transfer", | ||||
| @@ -283,11 +456,13 @@ | |||||
| } | } | ||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | |||||
| let oData3 = { | |||||
| tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
| tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
| bizPath: "transfer", | bizPath: "transfer", | ||||
| @@ -295,17 +470,19 @@ | |||||
| } | } | ||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| goBack(){ | |||||
| goBack() { | |||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| //删除家庭成员 | //删除家庭成员 | ||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| deleteChargeItme(index) { | |||||
| this.chargeItme.splice(index, 1) | |||||
| }, | }, | ||||
| }, | }, | ||||
| } | } | ||||
| @@ -315,44 +492,49 @@ | |||||
| .app-container { | .app-container { | ||||
| padding: 2% 0; | padding: 2% 0; | ||||
| } | } | ||||
| .main_more{ | |||||
| .main_more { | |||||
| width: 96%; | width: 96%; | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| margin-top: 10px; | margin-top: 10px; | ||||
| border-radius: 6px; | border-radius: 6px; | ||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16); | |||||
| overflow: hidden; | overflow: hidden; | ||||
| background-color: #FFF; | background-color: #FFF; | ||||
| text-align: center; | text-align: center; | ||||
| padding: 10PX 0; | padding: 10PX 0; | ||||
| } | } | ||||
| .main_title{ | |||||
| .main_title { | |||||
| font-size: 0.4rem; | font-size: 0.4rem; | ||||
| color: #1D6FE9; | color: #1D6FE9; | ||||
| margin: 0.2rem 6%; | margin: 0.2rem 6%; | ||||
| position: relative; | position: relative; | ||||
| } | } | ||||
| .main_box{ | |||||
| .main_box { | |||||
| width: 96%; | width: 96%; | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| border-radius: 6px; | border-radius: 6px; | ||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16); | |||||
| overflow: hidden; | overflow: hidden; | ||||
| background-color: #FFF; | background-color: #FFF; | ||||
| } | } | ||||
| .submitButton{ | |||||
| .submitButton { | |||||
| width: 80%; | width: 80%; | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| background-color: #1D6FE9; | background-color: #1D6FE9; | ||||
| } | } | ||||
| .addFamily{ | |||||
| .addFamily { | |||||
| position: absolute; | position: absolute; | ||||
| top: -2px; | top: -2px; | ||||
| right: 0; | right: 0; | ||||
| border-radius: 50%; | border-radius: 50%; | ||||
| } | } | ||||
| .deleteFamily{ | |||||
| .deleteFamily { | |||||
| position: absolute; | position: absolute; | ||||
| top: 0rem; | top: 0rem; | ||||
| right: 6%; | right: 6%; | ||||
| @@ -72,13 +72,43 @@ | |||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" @click-preview="previewPreview" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="发票" /> | <van-cell value="发票" /> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" @click-preview="previewPreview" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"> | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| <van-cell value="其他" /> | <van-cell value="其他" /> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | ||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||||
| <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" @click-preview="previewPreview" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" > | |||||
| <template #preview-cover="file"> | |||||
| <div class="preview-cover"> | |||||
| <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> | |||||
| <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> | |||||
| <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> | |||||
| </div> | |||||
| </template> | |||||
| </van-uploader> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -196,6 +226,120 @@ | |||||
| goFlow(){ | goFlow(){ | ||||
| window.location='approvalProcess?id='+this.$route.query.id; | window.location='approvalProcess?id='+this.$route.query.id; | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,'; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getDictionaries(){ | getDictionaries(){ | ||||
| getCash(this.$route.query.id).then((response) => { | getCash(this.$route.query.id).then((response) => { | ||||
| this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
| @@ -263,7 +407,9 @@ | |||||
| attachmentList(oData1).then(res => { | attachmentList(oData1).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData2= { | let oData2= { | ||||
| @@ -275,7 +421,9 @@ | |||||
| attachmentList(oData2).then(res => { | attachmentList(oData2).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| let oData3= { | let oData3= { | ||||
| @@ -287,7 +435,9 @@ | |||||
| attachmentList(oData3).then(res => { | attachmentList(oData3).then(res => { | ||||
| res.rows.map(r => { | res.rows.map(r => { | ||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
| this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
| let subIndex = r.fileName.lastIndexOf("."); | |||||
| let ext = r.fileName.substring(subIndex + 1, r.fileName.length); | |||||
| this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -21,7 +21,7 @@ | |||||
| finished-text="没有更多了" | finished-text="没有更多了" | ||||
| @load="getList"> | @load="getList"> | ||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | ||||
| <van-cell :title="item.payerAccount" center :to="{name:'approvalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||||
| <van-cell :title="item.remark" center :to="{name:'approvalDetail', query: {id:item.id,auditbatchNo:item.auditbatchNo}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../../../static/images/onlineHome/icon_yn1.png" size="30" color="#FF4646" style="margin-right: 10px;" /> | <van-icon name="../../../../../static/images/onlineHome/icon_yn1.png" size="30" color="#FF4646" style="margin-right: 10px;" /> | ||||
| </template> | </template> | ||||
| @@ -29,8 +29,10 @@ | |||||
| <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | ||||
| </template> | </template> | ||||
| <template #default> | <template #default> | ||||
| <p style="width: 80px;display: inline-block">{{item.auditStatus}}</p> | |||||
| <p v-if="item.auditStatus === '通过' && item.paymentState === '待支付'" style="color: #606266;width: 80px;display: inline-block">{{item.paymentState}}</p> | |||||
| <span v-if="item.auditStatus === '0'" style="color: #696969">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else-if="item.auditStatus === '1' " style="color: #FFA500;">{{ selectDictLabel(auditStatusOptions, item.auditStatus) }} </span> | |||||
| <p v-if="item.auditStatus === '3' && item.paymentState === '待支付'" style="color: #606266;width: 80px;display: inline-block">{{item.paymentState}}</p> | |||||
| <p v-else-if="item.paymentState === '银行受理'" style="width: 80px;display: inline-block">{{item.paymentState}}</p> | <p v-else-if="item.paymentState === '银行受理'" style="width: 80px;display: inline-block">{{item.paymentState}}</p> | ||||
| <p v-else-if="(item.paymentState === '支付失败' || item.paymentState === '部分失败') && item.downId == null" style="color: #F56C6C;width: 80px;display: inline-block">{{item.paymentState}}-未重新申请</p> | <p v-else-if="(item.paymentState === '支付失败' || item.paymentState === '部分失败') && item.downId == null" style="color: #F56C6C;width: 80px;display: inline-block">{{item.paymentState}}-未重新申请</p> | ||||
| <p v-else-if="(item.paymentState === '支付失败' || item.paymentState === '部分失败') && item.downId != null" style="color: #E6A23C;width: 80px;display: inline-block">{{item.paymentState}}-已重新申请</p> | <p v-else-if="(item.paymentState === '支付失败' || item.paymentState === '部分失败') && item.downId != null" style="color: #E6A23C;width: 80px;display: inline-block">{{item.paymentState}}-已重新申请</p> | ||||
| @@ -40,16 +42,16 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.paymentState === '银行受理'" square text="核实结果" color="#FFA63E" type="info" @click="transactionStatusQuery(item.id)" class="delete-button" /> | <van-button v-if="item.paymentState === '银行受理'" square text="核实结果" color="#FFA63E" type="info" @click="transactionStatusQuery(item.id)" class="delete-button" /> | ||||
| @@ -111,8 +113,10 @@ export default { | |||||
| listTransfer(this.queryParams).then(response => { | listTransfer(this.queryParams).then(response => { | ||||
| console.log(response) | console.log(response) | ||||
| for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
| response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||||
| response.rows[i].paymentState = this.selectDictLabel(this.paymentStateOptions, response.rows[i].paymentState); | response.rows[i].paymentState = this.selectDictLabel(this.paymentStateOptions, response.rows[i].paymentState); | ||||
| if(response.rows[i].remark.length > 12){ | |||||
| response.rows[i].remark = response.rows[i].remark.substring(0,12)+"..."; | |||||
| } | |||||
| this.applicationList.push(response.rows[i]); | this.applicationList.push(response.rows[i]); | ||||
| } | } | ||||
| console.log(this.applicationList.length >= response.total) | console.log(this.applicationList.length >= response.total) | ||||
| @@ -22,10 +22,13 @@ | |||||
| @load="getList" | @load="getList" | ||||
| > | > | ||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | ||||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail11', query: {id:item.id}}"> | |||||
| <van-cell :title="item.payer" center :to="{name:'approvalDetail11', query: {id:item.id}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../../../static/images/onlineHome/icon_yn7.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | <van-icon name="../../../../../static/images/onlineHome/icon_yn7.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | ||||
| </template> | </template> | ||||
| <span v-if="item.auditStatus === '0'">{{ selectDictLabel(this.auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else-if="item.auditStatus === '2' " style="color: #F56C6C">{{ selectDictLabel(this.auditStatusOptions, item.auditStatus)}} </span> | |||||
| <span v-else style="color: #67c23a;">{{ selectDictLabel(this.auditStatusOptions, item.auditStatus) }} </span> | |||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| </template> | </template> | ||||
| @@ -33,16 +36,16 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify11', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="修改" type="info" :to="{name:'approvalModify11', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='0'||item.auditStatus=='2'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='1'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| </template> | </template> | ||||
| @@ -95,7 +98,6 @@ export default { | |||||
| listCash(this.queryParams).then(response => { | listCash(this.queryParams).then(response => { | ||||
| console.log(response) | console.log(response) | ||||
| for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
| response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||||
| this.applicationList.push(response.rows[i]); | this.applicationList.push(response.rows[i]); | ||||
| } | } | ||||
| console.log(this.applicationList.length >= response.total) | console.log(this.applicationList.length >= response.total) | ||||
| @@ -234,11 +234,11 @@ | |||||
| <p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
| <div class="main_box" style="padding: 5px 0 0 0;"> | <div class="main_box" style="padding: 5px 0 0 0;"> | ||||
| <van-cell value="收据" /> | <van-cell value="收据" /> | ||||
| <van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList1" :after-read="beforeRead1" @click-preview="previewPreview" @delete="deleteFile1" style="margin-left:8px;"></van-uploader> | |||||
| <van-cell title="发票" /> | <van-cell title="发票" /> | ||||
| <van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList2" :after-read="beforeRead2" @click-preview="previewPreview" @delete="deleteFile2" style="margin-left:8px;"></van-uploader> | |||||
| <van-cell title="其他" /> | <van-cell title="其他" /> | ||||
| <van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||||
| <van-uploader v-model="fileList3" :after-read="beforeRead3" @click-preview="previewPreview" @delete="deleteFile3" style="margin-left:8px;"></van-uploader> | |||||
| </div> | </div> | ||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| @@ -2148,6 +2148,120 @@ | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | this.$notify({ type: 'danger', message: '收款方已存在!' }); | ||||
| } | } | ||||
| }, | }, | ||||
| previewPreview(file, index, len) { | |||||
| const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
| if (file.url) { | |||||
| //已上传文件 | |||||
| let fileName = file.file.name || file.url; | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| let imgi = file.listIndex | |||||
| //console.log(ext) | |||||
| let allUrl = file.url; | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| const link = document.createElement("a"); | |||||
| link.style.display = "none"; | |||||
| link.target = "_blank" | |||||
| link.href = allUrl; | |||||
| document.body.appendChild(link); | |||||
| link.click(); | |||||
| document.body.removeChild(link); | |||||
| } | |||||
| } else { | |||||
| //新上传文件 | |||||
| let fileName = file.file.name; | |||||
| // console.info(file.file.name) | |||||
| let subIndex = fileName.lastIndexOf("."); | |||||
| let ext = fileName.substring(subIndex + 1, fileName.length); | |||||
| if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ | |||||
| let type = this.getfileType(ext); | |||||
| // 将文件转换为base64编码 | |||||
| this.fileToBase64(file.file, ext).then(res => { | |||||
| this.downloadFile(res, fileName, ext, type); | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| getfileType(type) { | |||||
| switch (type) { | |||||
| case 'txt': | |||||
| return 'text/plain'; | |||||
| case 'doc': | |||||
| return 'application/msword'; | |||||
| case 'docx': | |||||
| return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; | |||||
| case 'xls': | |||||
| return 'application/vnd.ms-excel'; | |||||
| case 'xlsx': | |||||
| return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | |||||
| case 'pdf': | |||||
| return 'application/pdf'; | |||||
| case 'pptx': | |||||
| return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; | |||||
| case 'png': | |||||
| return 'image/png'; | |||||
| case 'jpg': | |||||
| return 'image/jpeg'; | |||||
| case 'gif': | |||||
| return 'image/gif'; | |||||
| case 'svg': | |||||
| return 'image/svg+xml'; | |||||
| case 'ico': | |||||
| return 'image/x-icon'; | |||||
| case 'bmp': | |||||
| return 'image/bmp,';; | |||||
| } | |||||
| }, | |||||
| downloadFile(base64, fileName, fileType, mimetype) { | |||||
| const typeHeader = 'data:application/' + fileType + ';base64,'; | |||||
| const blob = this.base64ToBlob(base64, mimetype); | |||||
| this.downloadFileDownload(blob, fileName, fileType); | |||||
| }, | |||||
| base64ToBlob(base64, mime) { | |||||
| //解码base64得到二进制字符串 | |||||
| let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); | |||||
| let rawLength = raw.length | |||||
| //创建8位无符号整数值的类型化数组 | |||||
| let uInt8Array = new Uint8Array(rawLength) | |||||
| for (let i = 0; i < rawLength; ++i) { | |||||
| uInt8Array[i] = raw.charCodeAt(i); | |||||
| } | |||||
| return new Blob([uInt8Array], {type: mime}) | |||||
| }, | |||||
| downloadFileDownload(blob, fileName, fileType) { | |||||
| const downloadElement = document.createElement('a'); | |||||
| let href = blob; | |||||
| if (typeof blob === 'string') { | |||||
| downloadElement.target = '_blank' | |||||
| } else { | |||||
| href = window.URL.createObjectURL(blob) | |||||
| } | |||||
| downloadElement.href = href; | |||||
| downloadElement.download = fileName + '.' + fileType;//下载后文件名 | |||||
| document.body.appendChild(downloadElement); | |||||
| downloadElement.click(); | |||||
| document.body.removeChild(downloadElement) | |||||
| if (typeof blob !== 'string') { | |||||
| window.URL.revokeObjectURL(href) | |||||
| } | |||||
| }, | |||||
| fileToBase64(file,fileType){ | |||||
| return new Promise((resolve,reject)=>{ | |||||
| //创建一个新的FileReader 对象 | |||||
| const reader = new FileReader(); | |||||
| //读取file对象 | |||||
| reader.readAsDataURL(file); | |||||
| reader.onload=function () { | |||||
| const base64String = reader.result.split(",")[1]; | |||||
| resolve('data:application/' + fileType + ';base64,'+base64String); | |||||
| } | |||||
| reader.onerror=function () { | |||||
| reject(new Error("Failed to load file") ) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| selectChange(select) { | selectChange(select) { | ||||
| let obj = {}; | let obj = {}; | ||||
| obj = this.payerOptions.find((account) => { | obj = this.payerOptions.find((account) => { | ||||
| @@ -598,6 +598,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -606,6 +607,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -616,6 +618,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -624,6 +627,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -658,6 +662,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -666,6 +671,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -676,6 +682,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -684,6 +691,7 @@ | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -736,12 +744,14 @@ | |||||
| this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| }else{ | }else{ | ||||
| @@ -750,12 +760,14 @@ | |||||
| this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| window.location.reload(); | |||||
| },2000) | },2000) | ||||
| } | } | ||||
| } | } | ||||
| @@ -25,7 +25,7 @@ | |||||
| </van-row> | </van-row> | ||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| <van-row v-if="processList.status==2" v-for="(item1,index,i) in processList.审批事项" :key="i"> | |||||
| <van-row v-for="(item1,index,i) in processList" :key="i"> | |||||
| <van-col span="4" align="right"> | <van-col span="4" align="right"> | ||||
| <p class="icon_jian" v-show="item1.auditStatus=='1'"><van-icon name="minus" size="14" /></p> | <p class="icon_jian" v-show="item1.auditStatus=='1'"><van-icon name="minus" size="14" /></p> | ||||
| <p class="icon_jian blue" v-show="item1.auditStatus=='3'"><van-icon name="success" size="14" /></p> | <p class="icon_jian blue" v-show="item1.auditStatus=='3'"><van-icon name="success" size="14" /></p> | ||||
| @@ -109,8 +109,8 @@ export default { | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| //查询审批进程 | //查询审批进程 | ||||
| getTransferProcess(id){ | |||||
| getTransferProcess(id).then(res => { | |||||
| getTransferProcess(auditbatchNo){ | |||||
| getTransferProcess(auditbatchNo).then(res => { | |||||
| this.processList = res.data[auditbatchNo] | this.processList = res.data[auditbatchNo] | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -119,7 +119,7 @@ export default { | |||||
| this.form = response.data; | this.form = response.data; | ||||
| this.processList = {} | this.processList = {} | ||||
| if(this.form.auditStatus != 0){ | if(this.form.auditStatus != 0){ | ||||
| this.getTransferProcess(this.$route.query.id); | |||||
| this.getTransferProcess(this.$route.query.auditbatchNo); | |||||
| } | } | ||||
| if(this.form.approvalMode == 1){ | if(this.form.approvalMode == 1){ | ||||
| selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | ||||
| @@ -25,7 +25,7 @@ | |||||
| </van-row> | </van-row> | ||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| <van-row v-if="processList.status==2" v-for="(item1,index,i) in processList.审批事项" :key="i"> | |||||
| <van-row v-for="(item1,index,i) in processList" :key="i"> | |||||
| <van-col span="4" align="right"> | <van-col span="4" align="right"> | ||||
| <p class="icon_jian" v-show="item1.auditStatus=='1'"><van-icon name="minus" size="14" /></p> | <p class="icon_jian" v-show="item1.auditStatus=='1'"><van-icon name="minus" size="14" /></p> | ||||
| <p class="icon_jian blue" v-show="item1.auditStatus=='3'"><van-icon name="success" size="14" /></p> | <p class="icon_jian blue" v-show="item1.auditStatus=='3'"><van-icon name="success" size="14" /></p> | ||||
| @@ -114,8 +114,8 @@ export default { | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| //查询审批进程 | //查询审批进程 | ||||
| getTransferProcess1(id){ | |||||
| getTransferProcess(id).then(res => { | |||||
| getTransferProcess1(auditbatchNo){ | |||||
| getTransferProcess(auditbatchNo).then(res => { | |||||
| this.processList = res.data[auditbatchNo] | this.processList = res.data[auditbatchNo] | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -124,7 +124,7 @@ export default { | |||||
| this.form = response.data; | this.form = response.data; | ||||
| this.processList = {} | this.processList = {} | ||||
| if(this.form.auditStatus != 0){ | if(this.form.auditStatus != 0){ | ||||
| this.getTransferProcess1(this.$route.query.id); | |||||
| this.getTransferProcess1(this.$route.query.auditbatchNo); | |||||
| } | } | ||||
| if(this.form.approvalMode == 1){ | if(this.form.approvalMode == 1){ | ||||
| selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | ||||
| @@ -48,14 +48,14 @@ | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p style="font-size: 12px;font-weight: normal;color: #878787;display: flex;justify-content: space-between;"> | <p style="font-size: 12px;font-weight: normal;color: #878787;display: flex;justify-content: space-between;"> | ||||
| <span style="width: 100%;text-align:left;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||||
| <span style="width: 100%;text-align:left;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||||
| break-all;overflow: hidden;">{{item.payeeToname}}</span> | break-all;overflow: hidden;">{{item.payeeToname}}</span> | ||||
| </p> | </p> | ||||
| </template> | </template> | ||||
| <template #default> | <template #default> | ||||
| <p style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: break-all;overflow: hidden;">{{item.actacn}}</p> | <p style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: break-all;overflow: hidden;">{{item.actacn}}</p> | ||||
| <p style="font-size: 12px;font-weight: normal;color: #878787;display: flex;justify-content: space-between;"> | <p style="font-size: 12px;font-weight: normal;color: #878787;display: flex;justify-content: space-between;"> | ||||
| <span style="width: 100%;text-align:right;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||||
| <span style="width: 100%;text-align:right;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: | |||||
| break-all;overflow: hidden;">{{item.payeeActacn}}</span> | break-all;overflow: hidden;">{{item.payeeActacn}}</span> | ||||
| </p> | </p> | ||||
| </template> | </template> | ||||
| @@ -66,7 +66,7 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import { listRecordDetail, getRecordDetail,getDianzihuidan} from "@/api/onlineHome/bankAgriculture/recordDetail"; | |||||
| import { listRecordDetail, getRecordDetail,getDianzihuidan} from "@/api/onlineHome/bankAgriculture/recordDetail"; | |||||
| import { getAccount} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { getAccount} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| export default { | export default { | ||||
| name: "recordDetailList", | name: "recordDetailList", | ||||
| @@ -109,7 +109,7 @@ export default { | |||||
| for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
| this.applicationList.push(response.rows[i]); | this.applicationList.push(response.rows[i]); | ||||
| } | } | ||||
| if(this.applicationList != null && this.applicationList != [] && this.applicationList.length>0){ | |||||
| if(this.applicationList != null && this.applicationList != []){ | |||||
| if(this.applicationList.length >= response.total){ | if(this.applicationList.length >= response.total){ | ||||
| this.finished = true; | this.finished = true; | ||||
| return; | return; | ||||
| @@ -120,6 +120,7 @@ export default { | |||||
| } | } | ||||
| }); | }); | ||||
| }, | }, | ||||
| getAccountList(){ | getAccountList(){ | ||||
| let params1={ | let params1={ | ||||
| accountType: "102", | accountType: "102", | ||||
| @@ -1,176 +0,0 @@ | |||||
| <template> | |||||
| <div> | |||||
| <van-nav-bar | |||||
| title="待办事项" | |||||
| /> | |||||
| <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="width: 96%;margin: 2%;height:128px;border-radius: 6px;"> | |||||
| <van-swipe-item v-for="(image,index) in images" :key="index"> | |||||
| <img :src="image" style="width:100%;height: 128px"/> | |||||
| </van-swipe-item> | |||||
| </van-swipe> | |||||
| <van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||||
| <van-cell> | |||||
| <template #title> | |||||
| <van-row style=""> | |||||
| <van-col span="23" :offset="1"> | |||||
| <h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||||
| <van-image | |||||
| height="20" | |||||
| width="20" | |||||
| style="vertical-align: middle;margin-right: 10px" | |||||
| src="../../../../static/images/onlineHome/done.png"></van-image>{{item.projectName}}</h3> | |||||
| </van-col> | |||||
| </van-row> | |||||
| </template> | |||||
| </van-cell> | |||||
| <van-cell> | |||||
| <template #title> | |||||
| <van-row> | |||||
| <van-col span="6" :offset="1"> | |||||
| <p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p> | |||||
| </van-col> | |||||
| <van-col span="10" :offset="1"> | |||||
| <p style="color: #878787">{{item.formData.activityBusinessType}}</p> | |||||
| </van-col> | |||||
| <van-col span="5" :offset="1"> | |||||
| <p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||||
| </van-col> | |||||
| </van-row> | |||||
| </template> | |||||
| </van-cell> | |||||
| </van-cell-group> | |||||
| <van-empty v-if="taskList.length<1" description="暂无事项" /> | |||||
| <yinnongIndex></yinnongIndex> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import onlineHomeIndex from "../../onlineHomeIndex"; | |||||
| import yinnongIndex from "../../yinnongIndex"; | |||||
| import { getInfo } from "../../../api/login/index"; | |||||
| import {ListDone, ListTodo} from "../../../api/onlineHome/done"; | |||||
| export default { | |||||
| components: { | |||||
| onlineHomeIndex, | |||||
| yinnongIndex | |||||
| }, | |||||
| name: "done", | |||||
| data(){ | |||||
| return{ | |||||
| taskList:[], | |||||
| activeName:this.$route.query.activeName?this.$route.query.activeName:'1', | |||||
| total:0, | |||||
| nickName:"", | |||||
| electronicSignature:"", | |||||
| queryParams: { | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| }, | |||||
| activityBusinessTypeOptions:[], | |||||
| images:['../../../../static/images/onlineHome/banner_03.png'], | |||||
| } | |||||
| }, | |||||
| created() { | |||||
| this.getDicts("activity_business_type").then((response) => { | |||||
| this.activityBusinessTypeOptions = response.data; | |||||
| if(this.$route.query.activeName){ | |||||
| this.activeName = this.$route.query.activeName | |||||
| } | |||||
| this.getList(); | |||||
| }); | |||||
| console.log(this.$route.query.fr) | |||||
| if(this.$route.query.fr){ | |||||
| this.$cookies.set("from",this.$route.query.fr,"0") | |||||
| } | |||||
| getInfo().then((response) => { | |||||
| this.electronicSignature = response.user.electronicSignature; | |||||
| this.nickName = response.user.nickName; | |||||
| }); | |||||
| }, | |||||
| methods: { | |||||
| goOnlineHomeIndex(){ | |||||
| if(this.$cookies.get("from")=="my"){ | |||||
| this.$router.push({name:"yinnongMy"}) | |||||
| }else{ | |||||
| this.$router.push({name:"yinnongWorkbench"}) | |||||
| } | |||||
| }, | |||||
| getList() { | |||||
| this.taskList = [] | |||||
| // this.$set(this.queryParams, "systemType", '4'); | |||||
| ListTodo(this.queryParams).then((response) => { | |||||
| response.rows.map(res => { | |||||
| if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||||
| res.tableName = '来自农村宅基地管理系统' | |||||
| }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){ | |||||
| res.tableName = '来自银农直联审批管理系统' | |||||
| }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | |||||
| res.tableName = '来自银农直联审批管理系统' | |||||
| } | |||||
| if(this.activityBusinessTypeOptions){ | |||||
| this.activityBusinessTypeOptions.map(t => { | |||||
| if(t.dictValue == res.formData.activityBusinessType){ | |||||
| res.formData.activityBusinessType = t.dictLabel | |||||
| this.taskList.push(res) | |||||
| } | |||||
| }); | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goDetail(item){ | |||||
| console.log(item) | |||||
| let type = item.formData.processKey; | |||||
| switch (type) { | |||||
| case 'homeuseZyyctcsq': | |||||
| this.$router.push({name:'sunVillageInfoPaidExitDetail',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type,electronicSignature:this.electronicSignature,nickName:this.nickName}}) | |||||
| break; | |||||
| case 'home_check': | |||||
| case 'home_start': | |||||
| this.$router.push({name:'approvalForm',query: {id:item.formData.ydjfsqId,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type,electronicSignature:this.electronicSignature,nickName:this.nickName}}) | |||||
| break; | |||||
| case 'home_apply': | |||||
| this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type,electronicSignature:this.electronicSignature,nickName:this.nickName}}) | |||||
| break; | |||||
| case 'baseApply': | |||||
| case 'landscope': | |||||
| case 'accepting': | |||||
| this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||||
| break; | |||||
| case 'toReviewTransferProcess': | |||||
| case 'yinnong_transfer': | |||||
| if(item.formData.transferType == '10'){ | |||||
| this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| if(item.formData.transferType == '11'){ | |||||
| this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| if(item.formData.transferType == '12'){ | |||||
| this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| if(item.formData.transferType != '10'&&item.formData.transferType != '11'&&item.formData.transferType != '12'){ | |||||
| this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| case 'yinnong_majorevent': | |||||
| this.$router.push({name:'approvalApproval13',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| } | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped> | |||||
| >>>.my-swipe .van-swipe-item { | |||||
| color: #fff; | |||||
| font-size: 20px; | |||||
| line-height: 144px; | |||||
| text-align: center; | |||||
| } | |||||
| </style> | |||||
| @@ -14,18 +14,18 @@ | |||||
| finished-text="没有更多了" | finished-text="没有更多了" | ||||
| @load="getList" | @load="getList" | ||||
| > | > | ||||
| <van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||||
| <van-cell> | |||||
| <van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||||
| <van-cell style="padding: 0 0"> | |||||
| <template #title> | <template #title> | ||||
| <van-row style=""> | <van-row style=""> | ||||
| <van-col span="23" :offset="1"> | <van-col span="23" :offset="1"> | ||||
| <h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||||
| <p style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||||
| <van-image | <van-image | ||||
| height="20" | height="20" | ||||
| width="20" | width="20" | ||||
| style="vertical-align: middle;margin-right: 10px" | style="vertical-align: middle;margin-right: 10px" | ||||
| src="../../../../static/images/onlineHome/done.png"></van-image>{{item.systemType =='4'?selectDictLabel(transferTypeOptions, item.data.transferType):item.auditName}}</h3> | |||||
| src="../../../../static/images/onlineHome/done.png"></van-image>{{item.auditName}}</p> | |||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| </template> | </template> | ||||
| @@ -34,7 +34,7 @@ | |||||
| <template #title> | <template #title> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="6" :offset="1"> | <van-col span="6" :offset="1"> | ||||
| <p style="color: #878787" >{{item.createTime?item.createTime.substring(0,10):item.data.updateTime.substring(0,10)}}</p> | |||||
| <p style="color: #878787" >{{item.createTime.substring(0,10)}}</p> | |||||
| </van-col> | </van-col> | ||||
| <van-col span="10" :offset="1"> | <van-col span="10" :offset="1"> | ||||
| <p style="color: #878787">{{item.businessType}}</p> | <p style="color: #878787">{{item.businessType}}</p> | ||||
| @@ -1,170 +0,0 @@ | |||||
| done.vue<template> | |||||
| <div> | |||||
| <van-nav-bar | |||||
| title="已办事项" | |||||
| /> | |||||
| <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="width: 96%;margin: 2%;height:128px;border-radius: 6px;"> | |||||
| <van-swipe-item v-for="(image,index) in images" :key="index"> | |||||
| <img :src="image" style="width:100%;height: 128px"/> | |||||
| </van-swipe-item> | |||||
| </van-swipe> | |||||
| <van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||||
| <van-cell> | |||||
| <template #title> | |||||
| <van-row style=""> | |||||
| <van-col span="23" :offset="1"> | |||||
| <h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||||
| <van-image | |||||
| height="20" | |||||
| width="20" | |||||
| style="vertical-align: middle;margin-right: 10px" | |||||
| src="../../../../static/images/onlineHome/done.png"></van-image>{{item.projectName}}</h3> | |||||
| </van-col> | |||||
| </van-row> | |||||
| </template> | |||||
| </van-cell> | |||||
| <van-cell> | |||||
| <template #title> | |||||
| <van-row> | |||||
| <van-col span="6" :offset="1"> | |||||
| <p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p> | |||||
| </van-col> | |||||
| <van-col span="10" :offset="1"> | |||||
| <p style="color: #878787">{{item.formData.activityBusinessType}}</p> | |||||
| </van-col> | |||||
| <van-col span="5" :offset="1"> | |||||
| <p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||||
| </van-col> | |||||
| </van-row> | |||||
| </template> | |||||
| </van-cell> | |||||
| </van-cell-group> | |||||
| <van-empty v-if="taskList.length<1" description="暂无事项" /> | |||||
| <yinnongIndex></yinnongIndex> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import onlineHomeIndex from "../../onlineHomeIndex"; | |||||
| import yinnongIndex from "../../yinnongIndex"; | |||||
| import {ListDone, ListTodo} from "../../../api/onlineHome/done"; | |||||
| export default { | |||||
| components: { | |||||
| onlineHomeIndex, | |||||
| yinnongIndex | |||||
| }, | |||||
| name: "done", | |||||
| data(){ | |||||
| return{ | |||||
| taskList:[], | |||||
| activeName:this.$route.query.activeName?this.$route.query.activeName:'2', | |||||
| total:0, | |||||
| queryParams: { | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| }, | |||||
| activityBusinessTypeOptions:[], | |||||
| images:['../../../../static/images/onlineHome/banner_02.png'], | |||||
| } | |||||
| }, | |||||
| created() { | |||||
| this.getDicts("activity_business_type").then((response) => { | |||||
| this.activityBusinessTypeOptions = response.data; | |||||
| if(this.$route.query.activeName){ | |||||
| this.activeName = this.$route.query.activeName | |||||
| } | |||||
| this.getList(); | |||||
| }); | |||||
| console.log(this.$route.query.fr) | |||||
| if(this.$route.query.fr){ | |||||
| this.$cookies.set("from",this.$route.query.fr,"0") | |||||
| } | |||||
| }, | |||||
| methods: { | |||||
| goOnlineHomeIndex(){ | |||||
| if(this.$cookies.get("from")=="my"){ | |||||
| this.$router.push({name:"yinnongMy"}) | |||||
| }else{ | |||||
| this.$router.push({name:"yinnongWorkbench"}) | |||||
| } | |||||
| }, | |||||
| getList() { | |||||
| this.taskList = [] | |||||
| // this.$set(this.queryParams, "systemType", '4'); | |||||
| ListDone(this.queryParams).then((response) => { | |||||
| response.rows.map(res => { | |||||
| if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||||
| res.tableName = '来自农村宅基地管理系统' | |||||
| }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){ | |||||
| res.tableName = '来自银农直联审批管理系统' | |||||
| }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | |||||
| res.tableName = '来自银农直联审批管理系统' | |||||
| } | |||||
| if(this.activityBusinessTypeOptions){ | |||||
| this.activityBusinessTypeOptions.map(t => { | |||||
| if(t.dictValue == res.formData.activityBusinessType){ | |||||
| res.formData.activityBusinessType = t.dictLabel | |||||
| this.taskList.push(res) | |||||
| } | |||||
| }); | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goDetail(item){ | |||||
| console.log(item) | |||||
| let type = item.formData.processKey; | |||||
| switch (type) { | |||||
| case 'homeuseZyyctcsq': | |||||
| this.$router.push({name:'sunVillageInfoPaidExitDetail',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||||
| break; | |||||
| case 'home_check': | |||||
| case 'home_start': | |||||
| this.$router.push({name:'approvalForm',query: {id:item.formData.ydjfsqId,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||||
| break; | |||||
| case 'home_apply': | |||||
| this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||||
| break; | |||||
| case 'baseApply': | |||||
| case 'landscope': | |||||
| case 'accepting': | |||||
| this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}}) | |||||
| break; | |||||
| case 'toReviewTransferProcess': | |||||
| case 'yinnong_transfer': | |||||
| if(item.formData.transferType == '10'){ | |||||
| this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| if(item.formData.transferType == '11'){ | |||||
| this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| if(item.formData.transferType == '12'){ | |||||
| this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| if(item.formData.transferType != '10'&&item.formData.transferType != '11'&&item.formData.transferType != '12'){ | |||||
| this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| case 'yinnong_majorevent': | |||||
| this.$router.push({name:'approvalApproval13',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||||
| break; | |||||
| } | |||||
| } | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped> | |||||
| >>>.my-swipe .van-swipe-item { | |||||
| color: #fff; | |||||
| font-size: 20px; | |||||
| line-height: 144px; | |||||
| text-align: center; | |||||
| } | |||||
| </style> | |||||
| @@ -8,18 +8,18 @@ done.vue<template> | |||||
| <img :src="image" style="width:100%;height: 150px"/> | <img :src="image" style="width:100%;height: 150px"/> | ||||
| </van-swipe-item> | </van-swipe-item> | ||||
| </van-swipe> | </van-swipe> | ||||
| <van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||||
| <van-cell> | |||||
| <van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | |||||
| <van-cell style="padding: 0 0"> | |||||
| <template #title> | <template #title> | ||||
| <van-row style=""> | <van-row style=""> | ||||
| <van-col span="23" :offset="1"> | <van-col span="23" :offset="1"> | ||||
| <h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||||
| <p style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | |||||
| <van-image | <van-image | ||||
| height="20" | height="20" | ||||
| width="20" | width="20" | ||||
| style="vertical-align: middle;margin-right: 10px" | style="vertical-align: middle;margin-right: 10px" | ||||
| src="../../../../static/images/onlineHome/done.png"></van-image>{{item.systemType =='4'?selectDictLabel(transferTypeOptions, item.data.transferType):item.auditName}}</h3> | |||||
| src="../../../../static/images/onlineHome/done.png"></van-image>{{item.auditName}}</p> | |||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| </template> | </template> | ||||
| @@ -34,7 +34,8 @@ done.vue<template> | |||||
| <p style="color: #878787">{{item.businessType}}</p> | <p style="color: #878787">{{item.businessType}}</p> | ||||
| </van-col> | </van-col> | ||||
| <van-col span="5" :offset="1"> | <van-col span="5" :offset="1"> | ||||
| <p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||||
| <p v-if="item.auditStatus == '2'" style="font-size: 14px;font-weight:bold;text-align: right;color: red">驳回</p> | |||||
| <p v-if="item.auditStatus == '3'" style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">通过</p> | |||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| </template> | </template> | ||||
| @@ -4,9 +4,9 @@ | |||||
| <van-tabbar route :placeholder="true" > | <van-tabbar route :placeholder="true" > | ||||
| <!-- <van-tabbar-item replace to="/yinnong/publicity" icon="bullhorn-o">公示</van-tabbar-item>--> | <!-- <van-tabbar-item replace to="/yinnong/publicity" icon="bullhorn-o">公示</van-tabbar-item>--> | ||||
| <!-- <van-tabbar-item replace to="/yinnong/doneCompleted/completed" icon="todo-list-o">待办</van-tabbar-item>--> | <!-- <van-tabbar-item replace to="/yinnong/doneCompleted/completed" icon="todo-list-o">待办</van-tabbar-item>--> | ||||
| <van-tabbar-item replace to="/yinnong/doneCompleted/completedNew" icon="todo-list-o">待办(新)</van-tabbar-item> | |||||
| <van-tabbar-item replace to="/yinnong/doneCompleted/completedNew" icon="todo-list-o">待办</van-tabbar-item> | |||||
| <!-- <van-tabbar-item replace to="/yinnong/doneCompleted/done" icon="completed">已办</van-tabbar-item>--> | <!-- <van-tabbar-item replace to="/yinnong/doneCompleted/done" icon="completed">已办</van-tabbar-item>--> | ||||
| <van-tabbar-item replace to="/yinnong/doneCompleted/doneNew" icon="completed">已办(新)</van-tabbar-item> | |||||
| <van-tabbar-item replace to="/yinnong/doneCompleted/doneNew" icon="completed">已办</van-tabbar-item> | |||||
| <van-tabbar-item replace to="/yinnong/workbench" icon="apps-o">工作台</van-tabbar-item> | <van-tabbar-item replace to="/yinnong/workbench" icon="apps-o">工作台</van-tabbar-item> | ||||
| <!-- <van-tabbar-item replace to="/yinnong/home" icon="wap-home-o">家园</van-tabbar-item> --> | <!-- <van-tabbar-item replace to="/yinnong/home" icon="wap-home-o">家园</van-tabbar-item> --> | ||||
| <van-tabbar-item replace to="/yinnong/my" icon="manager-o">我的</van-tabbar-item> | <van-tabbar-item replace to="/yinnong/my" icon="manager-o">我的</van-tabbar-item> | ||||