diff --git a/src/main/java/io/v/nutz/zhgh/welfare/controller/statistics/WelfareSingleController.java b/src/main/java/io/v/nutz/zhgh/welfare/controller/statistics/WelfareSingleController.java index 845e1da..4128e3d 100644 --- a/src/main/java/io/v/nutz/zhgh/welfare/controller/statistics/WelfareSingleController.java +++ b/src/main/java/io/v/nutz/zhgh/welfare/controller/statistics/WelfareSingleController.java @@ -732,10 +732,10 @@ public class WelfareSingleController { try { response.setContentType("application/octet-stream"); response.setHeader("content-disposition", "attachment;filename=" - + URLEncoder.encode(welfareProject.getName() + "签收表.xlsx", "UTF-8")); + + URLEncoder.encode(sysUnion.getUnioncode() + sysUnion.getUnionname() + welfareProject.getName() + "签收表.xlsx", "UTF-8")); //获取这个福利项目下的所有数据 - List allUser = welfareSingleService.getUserByProjectId(projectId, month, unionGroupId); - List userChoose = welfareSingleService.getUserChooseByProjectId(projectId, month, unionGroupId); +// List allUser = welfareSingleService.getUserByProjectId(projectId, month, unionGroupId); +// List userChoose = welfareSingleService.getUserChooseByProjectId(projectId, month, unionGroupId); welfareSingleService.exportReceiveDetail(projectId, welfareUnitId, new ArrayList<>(), new ArrayList<>(), response.getOutputStream()); ViTool.excelResponse(response, sysUnion.getUnioncode() + sysUnion.getUnionname() + welfareProject.getName() + "签收表.xlsx"); } catch (Exception e) { diff --git a/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java b/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java index 997b0b9..7535829 100644 --- a/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java +++ b/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java @@ -716,18 +716,19 @@ public class WelfareSingleServiceImpl extends ViServiceImpl impl }); List exportEntities = new ArrayList<>(); - exportEntities.add(new ExcelExportEntity("序号", "no", 20)); - exportEntities.add(new ExcelExportEntity("姓名", "username", 20)); - exportEntities.add(new ExcelExportEntity("工号", "loginname", 20)); - exportEntities.add(new ExcelExportEntity("所在分工会", "unionname", 20)); + exportEntities.add(new ExcelExportEntity("序号", "no", 10)); + exportEntities.add(new ExcelExportEntity("姓名", "username", 10)); + exportEntities.add(new ExcelExportEntity("工号", "loginname", 15)); +// exportEntities.add(new ExcelExportEntity("所在分工会", "unionname", 20)); exportEntities.add(new ExcelExportEntity("所在单位", "unitname", 20)); for (NutMap option : options) { - exportEntities.add(new ExcelExportEntity(option.getString("optionName"), option.getString("id"), 20)); + exportEntities.add(new ExcelExportEntity(option.getString("optionName"), option.getString("id"), 10)); } ExcelExportEntity excelExportEntity = new ExcelExportEntity(); excelExportEntity.setName("签字"); excelExportEntity.setKey("qzBytes"); + excelExportEntity.setHeight(20); excelExportEntity.setWidth(20); excelExportEntity.setType(2); excelExportEntity.setExportImageType(2); diff --git a/src/main/resources/views/mobile/welfare/list/receive.html b/src/main/resources/views/mobile/welfare/list/receive.html index c5f8c85..ea73520 100644 --- a/src/main/resources/views/mobile/welfare/list/receive.html +++ b/src/main/resources/views/mobile/welfare/list/receive.html @@ -647,13 +647,15 @@ layout("/mobile/platform.html"){ }) if (code === 0) { this.getUserSelection(this.projectId) - this.$modal.msgSuccess(msg) + this.$modal.msgSuccess("您已完成本次福利选择。") } else { this.$modal.msgError(msg) } this.confirmPopup = false await this.getProjectInfo() - window.location.reload() + setTimeout(() => { + window.location.reload() + }, 1000) }, //查看详情 diff --git a/src/main/resources/views/platform/welfare/userChoose.html b/src/main/resources/views/platform/welfare/userChoose.html index bedd05e..a6649c8 100644 --- a/src/main/resources/views/platform/welfare/userChoose.html +++ b/src/main/resources/views/platform/welfare/userChoose.html @@ -246,6 +246,7 @@ layout("/layouts/platform.html"){ @@ -485,6 +486,11 @@ layout("/layouts/platform.html"){ }, }, methods: { + onKeydown(event) { + if (event.key !== "ArrowUp" && event.key !== "ArrowDown") { + event.preventDefault(); + } + }, confirmButtonInfo(row) { const {choiceTimeEnd, choiceTimeStart, overdueChoiceTimeEnd, isChoose, selectTime} = row const now = moment().valueOf() @@ -562,14 +568,12 @@ layout("/layouts/platform.html"){ }, //数量更改 numChange(value, option, optionIndex) { - this.$nextTick(() => { // 查找+1按钮 const plusButton = document.querySelector('.el-input-number__increase'); // 添加点击事件监听器 plusButton.addEventListener('click', this.handlePlusButtonClick(value, option, optionIndex)); }) - }, handlePlusButtonClick(value, option, optionIndex) { const { @@ -590,7 +594,7 @@ layout("/layouts/platform.html"){ const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0) if (sum > multiSelectNum) { - this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], 'selectNum', value - 1) + this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], 'selectNum', multiSelectNum) this.$message.warning('此次福利最多只能选择' + multiSelectNum + '份'); } @@ -680,10 +684,7 @@ layout("/layouts/platform.html"){ projectId: this.projectInfo.id }) if (code === 0) { - this.$message({ - message: msg, - type: 'success' - }); + this.$message.success('您已完成本次福利选择。') } else { this.$message({ message: msg, @@ -755,9 +756,13 @@ layout("/layouts/platform.html"){ r.name = "收货地址:" + r.province + r.city + r.county + r.addressDetail + ",收件人:" + r.userName + ",联系方式:" + r.tel }) this.addressOptions = resp.data - - this.formData.addressId = this.addressOptions.find(v=> v.isDefault).id - + this.$nextTick(() => { + const address = this.addressOptions.find(v=> v.isDefault) + if (address) { + this.$set(this.formData, "addressId", address.id) + this.$set(this.formData, "receiveAddress", address.name) + } + }) }, }, async created() {