From d7f6e01f8af0aab8aa37c11e1c6524347606393c Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 29 Nov 2022 13:30:41 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E7=A6=8F=E5=88=A9=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/plugins/change/changewelfare.vue | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/src/views/modules/plugins/change/changewelfare.vue b/src/views/modules/plugins/change/changewelfare.vue index f25e3efa7..bb4ce7828 100644 --- a/src/views/modules/plugins/change/changewelfare.vue +++ b/src/views/modules/plugins/change/changewelfare.vue @@ -56,9 +56,37 @@ +
{{ $t('export') }} + 下载模板 + + 导入 +
+ +
{ + this.download(data, title + ".xls"); + }, + (rspMsg, data) => { + this.$message.error(rspMsg); + } + ); + }, + // 下载文件 + download (data, fileName) { + if (!data) { + return; + } + + var csvData = new Blob([data]); + + if (window.navigator && window.navigator.msSaveOrOpenBlob) { + window.navigator.msSaveOrOpenBlob(csvData, fileName); + } + // for Non-IE (chrome, firefox etc.) + else { + var a = document.createElement("a"); + document.body.appendChild(a); + a.style = "display: none"; + var url = window.URL.createObjectURL(csvData); + a.href = url; + a.download = fileName; + a.click(); + a.remove(); + window.URL.revokeObjectURL(url); + } + }, + // 上传文件之前的钩子 + beforeUpload (file) { + this.files = file; + + const isText = file.type === "application/vnd.ms-excel"; + const isTextComputer = + file.type === + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; + + if (!isText && !isTextComputer) { + this.$message.error("请选择正确格式的文件"); + this.files = null; + this.fileName = ""; + return false; + } else { + this.fileName = file.name; + return true; + } + }, + async uploadFile () { + if (this.fileName == "") { + this.$message.warning("请选择要上传的文件!"); + return false; + } + + this.$message({ + showClose: true, + message: "导入中,请到系统管理-导入记录中查看进度", + duration: 0, + }); + + //清空上传列表 + this.$refs["upload"].clearFiles(); + let url = ""; + + let fileFormData = new FormData(); + fileFormData.append("file", this.files); //filename是键,file是值,就是要传的文件,test.zip是要传的文件名 + + url = "/epmetuser/changeWelfare/pointImport"; + + window.app.ajax.post2( + url, + fileFormData, + (data, rspMsg) => { + if (data.code === 0 && data.msg == "success") { + // this.$message.success('导入成功') + } else { + // this.$message({ + // showClose: true, + // message: rspMsg, + // duration: 0, + // type: "error" + // }) + // this.$message.error(rspMsg) + } + this.loadTable(); + }, + (rspMsg, data) => { }, + { headers: { "Content-Type": "multipart/form-data" } } + ); + }, exportHandle () { const url = this.mixinViewModuleOptions.exportURL this.$http({ @@ -275,6 +405,11 @@ export default { diff --git a/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue b/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue index be668fb5d..794f39b3f 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue @@ -76,40 +76,44 @@
居住成员信息
-
- +
+ - - - - - + - + - + + + + + - + + + + + - + - +
- + - + @@ -294,6 +298,7 @@ export default { checkReason: '', checkVisible: false, disabledBtn: false, + disabledBtn_check: false, mzOptions:[], } }, @@ -411,7 +416,9 @@ export default { lessorRelation: this.dataForm.lessorRelation, reason: this.checkReason } + this.disabledBtn_check = true, this.$http.post('/pli/power/rentContractInfo/review', params).then(({ data: res }) => { + this.disabledBtn_check = false if (res.code !== 0) { return this.$message.error(res.msg) } @@ -492,4 +499,13 @@ export default { // width: 280px; } } +.add-member{ + border-bottom: 1px dashed #dcdfe6; + margin-bottom: 20px; + .el-form-item { + .el-form-item__content{ + width: 190px !important; + } + } +} From 1e4abeb448e997b20d602a765f8c0a2f74997e81 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Tue, 6 Dec 2022 15:01:00 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rent/rentcontractinfo-add-or-update.vue | 71 +++++++++++++++---- 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue index 9bb14f981..4154a30bc 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue @@ -150,34 +150,34 @@ 添加成员

- + - + - + - + - + - + - + - + - +
- + --> - +
- + - + Date: Tue, 6 Dec 2022 16:36:35 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rent/rentcontractinfo-add-or-update.vue | 75 ++++--------------- 1 file changed, 16 insertions(+), 59 deletions(-) diff --git a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue index 4154a30bc..e64242d71 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue @@ -150,34 +150,34 @@ 添加成员

- + - + - + - + - + - + - + - + - +
- + --> - +
- + - + Date: Wed, 7 Dec 2022 15:39:14 +0800 Subject: [PATCH 11/14] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/plugins/rent/rentcontractinfo-add-or-update.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue index e64242d71..05fffda0c 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue @@ -277,7 +277,7 @@ -
+
-
+
-
+
Date: Wed, 7 Dec 2022 15:47:54 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/plugins/rent/rentcontractinfo-add-or-update.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue index 05fffda0c..fc98783a2 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue @@ -7,7 +7,8 @@ + @change="handleChangeAgency" + style="width: 300px;"> + @change="handleChangeGrid" + style="width: 300px;"> Date: Wed, 7 Dec 2022 16:47:26 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/plugins/rent/rentcontractinfo-look-or-check.vue | 4 +++- src/views/modules/plugins/rent/rentcontractinfo.vue | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue b/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue index 794f39b3f..7dbf7fbb2 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue @@ -252,6 +252,7 @@ export default { data () { return { visible: false, + pageId:'', dataForm: { id: '', flag: '', @@ -382,7 +383,8 @@ export default { }, // 获取信息 getInfo () { - this.$http.get(`/pli/power/rentContractInfo/${this.dataForm.id}`).then(({ data: res }) => { + let Url = this.pageId === 'rentcontractinfo' ? 'plirentcontractinfolog' : 'rentContractInfo' + this.$http.get(`/pli/power/${Url}/${this.dataForm.id}`).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/plugins/rent/rentcontractinfo.vue b/src/views/modules/plugins/rent/rentcontractinfo.vue index 7ae1c67ea..6a1f7533e 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo.vue @@ -295,6 +295,7 @@ export default { this.$nextTick(() => { this.$refs.addOrUpdate.dataForm.id = id this.$refs.addOrUpdate.dataForm.flag = flag + this.$refs.addOrUpdate.pageId= 'rentcontractinfo' this.$refs.addOrUpdate.init() }) }, From 3d1a53cdbe160b2d8fb72d139c28aba7e8830e13 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Wed, 7 Dec 2022 17:06:59 +0800 Subject: [PATCH 14/14] 1 --- .../modules/plugins/rent/rentcontractinfo-look-or-check.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue b/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue index 7dbf7fbb2..6a8457ff4 100644 --- a/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue +++ b/src/views/modules/plugins/rent/rentcontractinfo-look-or-check.vue @@ -225,8 +225,8 @@ {{ $t('cancel') }} - {{ $t('checkBTGBtn') }} - {{ $t('checkTGBtn') }} + {{ $t('checkBTGBtn') }} + {{ $t('checkTGBtn') }}